#include <bits/stdc++.h>
const int N = 210;
const int inf = 0x3f3f3f3f;
using namespace std;
long long n, m, k, I;
int a[N], d[N];
char s[N];
long long dp[N][N];
bool cmp(const int &x, const int &y) { return a[x] < a[y]; }
int main() {
  cin >> n >> m >> k;
  I = n + m - 1;
  for (int i = 0; i < I; i++) a[i] = m * n, d[i] = i;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++) {
      int x;
      cin >> x;
      if (x < a[i + j]) a[i + j] = x;
    }
  sort(d, d + I, cmp);
  for (int l = 0; l < I; l++) {
    s[d[l]] = '(';
    memset(dp, 0, sizeof(dp));
    dp[0][0] = 1;
    for (int i = 0; i < I; i++)
      for (int j = 0; j <= i; j++) {
        if (dp[i][j] == 0) continue;
        if (dp[i][j] > k) dp[i][j] = k;
        if (s[i] != '(' && j) dp[i + 1][j - 1] += dp[i][j];
        if (s[i] != ')') dp[i + 1][j + 1] += dp[i][j];
      }
    if (dp[I][0] < k) s[d[l]] = ')', k -= dp[I][0];
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) printf("%c", s[i + j]);
    puts("");
  }
  return 0;
}
