#include <bits/stdc++.h>
using namespace std;
const int N = 101;
int n, m;
long long k;
int c[N][N];
long long F[2 * N][2 * N];
int res[2 * N];
pair<int, int> prio[2 * N];
long long cnt() {
  for (int i = 0; i < (n + m); ++i)
    for (int j = 0; j < (n + m); ++j) F[i][j] = 0;
  F[0][1] = 1;
  for (int i = 1; i <= (n + m - 2); ++i) {
    for (int j = 0; j <= i + 1; j++) {
      if (res[i] == 1)
        F[i][j] = (j > 0) ? F[i - 1][j - 1] : 0;
      else if (res[i] == 2)
        F[i][j] = F[i - 1][j + 1];
      else
        F[i][j] = min(((j > 0) ? F[i - 1][j - 1] : 0) + F[i - 1][j + 1],
                      1000000000000000001LL);
    }
  }
  return F[n + m - 2][0];
}
int main() {
  cin >> n >> m >> k;
  for (int i = 1; i <= (m + n - 1); ++i) {
    prio[i].first = n * m + 1;
    prio[i].second = i;
  }
  res[0] = 1;
  for (int i = 1; i <= (n + m - 3); ++i) res[i] = 0;
  res[n + m - 2] = 2;
  for (int i = 0; i < (n); ++i)
    for (int j = 0; j < (m); ++j) {
      cin >> c[i][j];
      prio[i + j].first = min(prio[i + j].first, c[i][j]);
    }
  sort(prio + 1, prio + n + m - 2);
  for (int i = 1; i <= (n + m - 3); ++i) {
    res[prio[i].second] = 1;
    long long c = cnt();
    if (k <= c) continue;
    k -= c;
    res[prio[i].second] = 2;
  }
  for (int i = 0; i < (n); ++i) {
    for (int j = 0; j < (m); ++j) printf("%c", (res[i + j] == 1) ? '(' : ')');
    printf("\n");
  }
}
