#include <bits/stdc++.h>
using namespace std;
const int N = 222;
const int INF = 1e6;
const long long INFLL = 1e18;
int n, m, a[N][N], priority[2 * N];
long long k, dp[2 * N][2 * N];
char fix[2 * N];
long long getCnt();
int main() {
  cin >> n >> m >> k;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++) cin >> a[i][j];
  fill(priority, priority + n + m - 1, INF);
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++) priority[i + j] = min(priority[i + j], a[i][j]);
  vector<int> fill_order(n + m - 1);
  iota(fill_order.begin(), fill_order.end(), 0);
  sort(fill_order.begin(), fill_order.end(),
       [&](int i, int j) { return priority[i] < priority[j]; });
  fill(fix, fix + n + m - 1, '?');
  for (int diag : fill_order) {
    fix[diag] = '(';
    long long cnt = getCnt();
    if (k > cnt) {
      k -= cnt;
      fix[diag] = ')';
    }
  }
  for (int i = 0; i < n; i++, cout << endl)
    for (int j = 0; j < m; j++) cout << fix[i + j];
}
long long getCnt() {
  memset(dp, 0, sizeof dp);
  if (fix[0] != ')') dp[0][1] = 1;
  for (int ind = 1; ind < n + m - 1; ind++)
    for (int open = 0; open <= ind + 1; open++) {
      switch (fix[ind]) {
        case ')':
          dp[ind][open] = dp[ind - 1][open + 1];
          break;
        case '(':
          if (open > 0) dp[ind][open] = dp[ind - 1][open - 1];
          break;
        case '?':
          dp[ind][open] =
              dp[ind - 1][open + 1] + (open > 0 ? dp[ind - 1][open - 1] : 0);
          break;
      }
      dp[ind][open] = min(dp[ind][open], INFLL);
    }
  return dp[n + m - 2][0];
}
