#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using uint = unsigned int;
using rl = double;
using pii = pair<int, int>;
const ll INF = 1000 * 1000 * 1000LL * 1000 * 1000 * 1000LL;
const int MAXN = 209;
int n, m;
ll k;
int sidx[MAXN];
char fseq[MAXN];
int sperm[MAXN];
void addMaxK(ll& a, ll b) {
  a += b;
  if (a > k) a = k + 1;
}
ll dp[MAXN][MAXN];
ll Count() {
  dp[1][0] = 1;
  for (int i = 2; i <= n + m; i++) {
    for (int j = 0; j <= i - 1 && j <= n + m - i; j++) {
      dp[i][j] = 0;
      if (fseq[i] == 0) {
        addMaxK(dp[i][j], dp[i - 1][j + 1]);
        if (j) {
          addMaxK(dp[i][j], dp[i - 1][j - 1]);
        }
        continue;
      } else if (fseq[i] == '(') {
        if (j) {
          addMaxK(dp[i][j], dp[i - 1][j - 1]);
        }
      } else {
        addMaxK(dp[i][j], dp[i - 1][j + 1]);
      }
    }
  }
  return dp[n + m][0];
}
int main() {
  scanf("%d %d %lld", &n, &m, &k);
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      int idx;
      scanf("%d", &idx);
      int ds = j + i;
      if (sidx[ds] == 0 || sidx[ds] > idx) sidx[ds] = idx;
    }
  }
  for (int i = 2; i <= n + m; i++) {
    sperm[i] = i;
  }
  sort(sperm + 2, sperm + n + m + 1,
       [](int a, int b) { return sidx[a] < sidx[b]; });
  for (int i = 2; i <= n + m; i++) {
    int fds = sperm[i];
    fseq[fds] = '(';
    ll zk = Count();
    if (zk >= k) {
      continue;
    }
    k -= zk;
    fseq[fds] = ')';
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      int ds = i + j;
      printf("%c", fseq[ds]);
    }
    printf("\n");
  }
}
