#include <bits/stdc++.h>
using namespace std;
const int MAXN = 4e2 + 10;
const int DELTA = 26003;
long long n, m, k, dp[MAXN][MAXN], prio[MAXN], local[MAXN], inp;
char answer[MAXN];
bool cmp(int i, int j) { return local[i] < local[j]; }
int main() {
  ios::sync_with_stdio(0);
  cin >> n >> m >> k;
  const int w = n + m - 1;
  for (int i = 0; i != w; ++i) {
    prio[i] = i;
    local[i] = 1e9;
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      cin >> inp;
      local[i + j] = min(local[i + j], inp);
    }
  }
  sort(prio, prio + w, cmp);
  for (int q = 0; q != w; ++q) {
    answer[prio[q]] = '(';
    dp[0][0] = 1;
    for (int i = 1; i <= w; i++) {
      for (int j = 0; j <= w; j++) {
        dp[i][j] = 0;
        if (answer[i - 1] != ')' && j) dp[i][j] += dp[i - 1][j - 1];
        if (answer[i - 1] != '(' && j != w) dp[i][j] += dp[i - 1][j + 1];
        dp[i][j] = min(dp[i][j], (long long)1e18);
      }
    }
    if (dp[w][0] < k) {
      answer[prio[q]] = ')';
      k -= dp[w][0];
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      cout << answer[i + j];
    }
    cout << endl;
  }
}
