#include <bits/stdc++.h>
using namespace std;
const long long INF = 1000000000000000005LL;
long long M[201][201];
long long dp(int p, int k, string& s) {
  if (p == s.size()) {
    if (k == 0) return 1;
    return 0;
  }
  if (k < 0) return 0;
  long long& ans = M[p][k];
  if (ans == -1) {
    if (s[p] == '.')
      ans = min(dp(p + 1, k + 1, s) + dp(p + 1, k - 1, s), INF);
    else if (s[p] == '(')
      ans = min(dp(p + 1, k + 1, s), INF);
    else
      ans = min(dp(p + 1, k - 1, s), INF);
  }
  return ans;
}
int main() {
  int n, m;
  long long k;
  cin >> n >> m >> k;
  vector<pair<int, int> > c(n + m - 1, pair<int, int>(1000000000, 0));
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < m; ++j) {
      int a;
      cin >> a;
      c[i + j].first = min(c[i + j].first, a);
      c[i + j].second = i + j;
    }
  }
  string s(n + m - 1, '.');
  sort(c.begin(), c.end());
  for (int i = 0; i < n + m - 1; ++i) {
    memset(M, -1, sizeof(M));
    s[c[i].second] = '(';
    long long cnt = dp(0, 0, s);
    if (cnt < k) {
      s[c[i].second] = ')';
      k -= cnt;
    }
  }
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < m; ++j) cout << s[i + j];
    cout << endl;
  }
}
