#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 100 + 5;
const long long MAX = 1e18;
int n, m;
long long k;
int priorities[MAX_N][MAX_N];
pair<int, int> location[MAX_N * MAX_N];
long long dp[2 * MAX_N][2 * MAX_N];
char res[2 * MAX_N];
long long rec(int pos, int open) {
  if (open < 0) {
    return 0;
  }
  long long& ret = dp[pos][open];
  if (ret != -1) {
    return ret;
  }
  if (pos == m + n - 1) {
    return ret = (open == 0 ? 1 : 0);
  }
  if (res[pos] != -1) {
    ret = rec(pos + 1, open + (res[pos] == '(' ? 1 : -1));
  } else {
    ret = rec(pos + 1, open - 1) + rec(pos + 1, open + 1);
  }
  if (ret > MAX) {
    ret = MAX;
  }
  return ret;
}
int main(int argc, char** argv) {
  cin >> n >> m >> k;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      cin >> priorities[i][j];
      location[priorities[i][j]] = make_pair(i, j);
    }
  }
  memset(res, -1, sizeof(res));
  res[m + n - 1] = 0;
  for (int i = 1; i <= m * n; i++) {
    pair<int, int> p = location[i];
    int idx = p.first + p.second;
    if (res[idx] != -1) {
      continue;
    }
    res[idx] = '(';
    memset(dp, -1, sizeof(dp));
    long long cnt = rec(0, 0);
    if (k > cnt) {
      res[idx] = ')';
      k -= cnt;
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      printf("%c", res[i + j]);
    }
    printf("\n");
  }
  return 0;
}
