#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
const long double eps = 1e-7;
const int inf = 1000000010;
const long long INF = 1000000000000001000LL;
const int mod = 1000000007;
const int MAXN = 110, LOG = 20;
long long n, m, k, u, v, x, y, t, a, b, ans;
int A[MAXN * 2];
int mn[MAXN * 2];
int C[MAXN][MAXN];
long long dp[MAXN * 2][MAXN];
vector<int> vec;
void do_dp() {
  dp[0][0] = 1;
  for (int i = 1; i <= n + m - 1; i++)
    for (int j = 0; j <= n + m; j++) {
      if (A[i] == 1)
        dp[i][j] = (!j ? 0 : dp[i - 1][j - 1]);
      else if (A[i] == -1)
        dp[i][j] = dp[i - 1][j + 1];
      else
        dp[i][j] =
            min(INF, (long long)dp[i - 1][j + 1] + (j ? dp[i - 1][j - 1] : 0));
    }
}
bool cmp(int i, int j) { return mn[i] < mn[j]; }
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  memset(mn, 63, sizeof(mn));
  cin >> n >> m >> k;
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++)
      cin >> C[i][j], mn[i + j - 1] = min(mn[i + j - 1], C[i][j]);
  for (int i = 1; i <= n + m - 1; i++) vec.push_back(i);
  sort(vec.begin(), vec.end(), cmp);
  do_dp();
  for (int pos : vec) {
    A[pos] = 1;
    do_dp();
    cerr << "dp[n + m - 1][0]" << '=' << (dp[n + m - 1][0]) << endl;
    if (dp[n + m - 1][0] < k) {
      k -= dp[n + m - 1][0];
      A[pos] = -1;
    }
  }
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++) {
      if (A[i + j - 1] == 1)
        cout << '(';
      else
        cout << ')';
      if (j == m) cout << '\n';
    }
  return 0;
}
