#include <bits/stdc++.h>
using namespace std;
const int N = 1e2 + 7;
int n, m;
long long k;
int a[2 * N];
int ord[2 * N];
int go[2 * N];
long long dp[2 * N][N];
long long solve(long long k) {
  if (a[1] == 2 || a[n + m - 1] == 1) return 0;
  memset(dp, 0, sizeof dp);
  dp[n + m - 1][1] = 1;
  for (int i = n + m - 2; i >= 2; i--) {
    for (int j = 0; j <= (n + m - 1) / 2; j++) {
      if (a[i] == 0) {
        if (j == 0)
          dp[i][j] = dp[i + 1][j + 1];
        else
          dp[i][j] = dp[i + 1][j + 1] + dp[i + 1][j - 1];
      }
      if (a[i] == 1) {
        dp[i][j] = dp[i + 1][j + 1];
      }
      if (j > 0 && a[i] == 2) {
        dp[i][j] = dp[i + 1][j - 1];
      }
      dp[i][j] = min(dp[i][j], k + 1);
    }
  }
  return dp[2][1];
}
int main() {
  cin >> n >> m >> k;
  memset(ord, 127, sizeof ord);
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      int p;
      cin >> p;
      ord[i + j - 1] = min(p, ord[i + j - 1]);
    }
  }
  for (int i = 1; i <= n + m - 1; i++) go[i] = i;
  sort(go + 1, go + n + m, [](int x, int y) { return ord[x] < ord[y]; });
  for (int i = 1; i <= n + m - 1; i++) {
    long long op, cl;
    a[go[i]] = 1;
    op = solve(k);
    a[go[i]] = 2;
    cl = solve(k);
    if (k <= op)
      a[go[i]] = 1;
    else {
      a[go[i]] = 2;
      k -= op;
    }
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      if (a[i + j - 1] == 1)
        cout << "(";
      else
        cout << ")";
    }
    cout << endl;
  }
  return 0;
}
