#include <bits/stdc++.h>
using namespace std;
int n, m;
long long k;
int pri[210];
int inf[210];
int A[210];
bool cmp(int a, int b) { return pri[a] < pri[b]; }
long long have[210][210];
long long hm() {
  for (int c = 0; c < 210; c++)
    for (int d = 0; d < 210; d++) have[c][d] = 0ll;
  have[1][0] = 1ll;
  for (int c = 1; c < n + m; c++) {
    for (int d = 0; d < 210; d++)
      if (have[c][d] != 0ll) {
        have[c][d] = min(have[c][d], k + 2ll);
        if (A[c + 1] != -1) {
          have[c + 1][d + 1] += have[c][d];
        }
        if (A[c + 1] != 1 and d > 0) {
          have[c + 1][d - 1] += have[c][d];
        }
      }
  }
  return have[n + m][0];
}
int main() {
  scanf("%d%d", &n, &m);
  cin >> k;
  k--;
  for (int c = 0; c < 210; c++) pri[c] = 1000000000;
  for (int c = 1; c <= n; c++)
    for (int d = 1; d <= m; d++) {
      int x;
      scanf("%d", &x);
      pri[c + d] = min(pri[c + d], x);
    }
  for (int c = 2; c <= n + m; c++) inf[c] = c;
  sort(inf + 2, inf + n + m + 1, cmp);
  for (int c = 2; c <= n + m; c++) {
    int p = inf[c];
    A[p] = 1;
    long long r = hm();
    if (k >= r) {
      k -= r;
      A[p] = -1;
    }
  }
  for (int c = 1; c <= n; c++) {
    for (int d = 1; d <= m; d++) {
      if (A[c + d] == 1) printf("(");
      if (A[c + d] == -1) printf(")");
    }
    printf("\n");
  }
  return 0;
}
