#include <bits/stdc++.h>
using namespace std;
class point {
 public:
  int id, val, st;
};
bool operator<(const point &a, const point &b) {
  if (a.val < b.val) return true;
  return false;
}
const int maxn = 1000 * 1000 * 1000;
int n, m, i, j, col, x, y;
int pp[101][101];
int a[500];
unsigned long long k, p;
point b[501];
string ans;
char s[101][101];
unsigned long long dp[221][221];
bool mark[221][221];
unsigned long long rec(int i, int j) {
  if (i == col) {
    if (j == 0) return 1;
    return 0;
  }
  if (mark[i][j] == 1) return dp[i][j];
  dp[i][j] = 0;
  if (ans[i] == '(')
    dp[i][j] = rec(i + 1, j + 1);
  else if (ans[i] == ')') {
    if (j > 0) dp[i][j] = rec(i + 1, j - 1);
  } else {
    dp[i][j] = rec(i + 1, j + 1);
    if (j > 0) dp[i][j] += rec(i + 1, j - 1);
  }
  dp[i][j] = min(dp[i][j], k + 1);
  mark[i][j] = 1;
  return dp[i][j];
}
int main() {
  cin >> n >> m >> k;
  for (i = 1; i <= n; i++)
    for (j = 1; j <= m; j++) cin >> pp[i][j];
  for (i = 1; i <= n; i++)
    for (j = 1; j <= m; j++) a[i + j] = maxn;
  for (i = 1; i <= n; i++)
    for (j = 1; j <= m; j++) a[i + j] = min(a[i + j], pp[i][j]);
  for (j = 1; j <= m; j++) {
    b[j].val = a[j + 1];
    b[j].id = j;
    b[j].st = 1 + j;
  }
  for (i = 2; i <= n; i++) {
    b[m + i - 1].val = a[m + i];
    b[m + i - 1].id = m + i - 1;
    b[m + i - 1].st = m + i;
  }
  col = m + n - 1;
  sort(b + 1, b + col + 1);
  ans = "";
  for (i = 1; i <= col; i++) ans += " ";
  for (i = 1; i <= col; i++) {
    ans[b[i].id - 1] = '(';
    memset(mark, 0, sizeof(mark));
    p = rec(0, 0);
    if (p < k) {
      ans[b[i].id - 1] = ')';
      for (x = 1; x <= n; x++)
        for (y = 1; y <= m; y++)
          if (x + y == b[i].st) s[x][y] = ')';
      k -= p;
    } else {
      for (x = 1; x <= n; x++)
        for (y = 1; y <= m; y++)
          if (x + y == b[i].st) s[x][y] = '(';
    }
  }
  for (i = 1; i <= n; i++) {
    for (j = 1; j <= m; j++) cout << s[i][j];
    cout << endl;
  }
  return 0;
}
