#include <bits/stdc++.h>
using namespace std;
int n, m, i, j, k, f[100010], a[500][500], b[100010], ans[100010];
long long K, g[500][500];
bool cmp(int a, int b) { return f[a] < f[b]; }
int main() {
  scanf("%d%d%I64d", &n, &m, &K);
  for (i = 1; i <= n + m - 1; i++) f[i] = 0x37373737;
  for (i = 1; i <= n; i++)
    for (j = 1; j <= m; j++) scanf("%d", &a[i][j]);
  for (i = 1; i <= n; i++)
    for (j = 1; j <= m; j++) f[i + j - 1] = min(f[i + j - 1], a[i][j]);
  for (i = 1; i <= n + m - 1; i++) b[i] = i;
  sort(b + 1, b + n + m, cmp);
  ans[1] = 1;
  ans[n + m - 1] = 2;
  for (i = 1; i <= n + m - 1; i++)
    if ((b[i] == 1) || (b[i] == n + m - 1))
      continue;
    else {
      ans[b[i]] = 1;
      memset(g, 0, sizeof(g));
      g[0][0] = 1;
      for (j = 1; j <= n + m - 1; j++)
        for (k = 0; k <= j; k++) {
          if (ans[j] == 1) {
            if (k > 0) g[j][k] = g[j - 1][k - 1];
          } else if (ans[j] == 2)
            g[j][k] = g[j - 1][k + 1];
          else {
            if (k > 0) g[j][k] = g[j - 1][k - 1];
            g[j][k] = g[j][k] + g[j - 1][k + 1];
          }
          if (g[j][k] > K) g[j][k] = K + 1;
        }
      if (g[n + m - 1][0] < K) {
        ans[b[i]] = 2;
        K = K - g[n + m - 1][0];
      }
    }
  for (i = 1; i <= n; i++) {
    for (j = 1; j <= m; j++)
      if (ans[i + j - 1] == 1)
        cout << "(";
      else
        cout << ")";
    cout << endl;
  }
}
