#include <bits/stdc++.h>
using namespace std;
int a[205], b[205];
long long dp[205][205], k;
int n, m;
char ans[205];
bool cmp(int x, int y) { return a[x] < a[y]; }
int main() {
  scanf("%d%d", &n, &m);
  cin >> k;
  int t = n + m - 1;
  for (int i = 0; i < t; i++) {
    a[i] = n * m;
    b[i] = i;
  }
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++) {
      int tmp;
      scanf("%d", &tmp);
      if (tmp < a[i + j]) a[i + j] = tmp;
    }
  sort(b, b + t, cmp);
  for (int q = 0; q < t; q++) {
    ans[b[q]] = '(';
    dp[0][0] = 1;
    for (int i = 0; i < t; i++)
      for (int j = i & 1; j <= i && j <= t - i; j += 2)
        if (dp[i][j]) {
          if (dp[i][j] > k) dp[i][j] = k;
          if (ans[i] != ')') dp[i + 1][j + 1] += dp[i][j];
          if (ans[i] != '(' && j) dp[i + 1][j - 1] += dp[i][j];
          dp[i][j] = 0;
        }
    if (dp[t][0] < k) {
      k -= dp[t][0];
      ans[b[q]] = ')';
    }
    dp[t][0] = 0;
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) cout.put(ans[i + j]);
    puts("");
  }
  return 0;
}
