#include <bits/stdc++.h>
using namespace std;
const long long LINF = ~(((long long)0x1) << 63) / 2;
const int INF = 0X3F3F3F3F;
const double eps = 1e-7;
pair<int, int> p[210];
long long dp[210][210];
int ok[210];
int main() {
  int n, m, i, j, k, s;
  long long lim;
  cin >> n >> m >> lim;
  s = n + m - 1;
  for (i = 0; i <= s; i++) p[i].first = INF;
  for (i = 0; i < n; i++)
    for (j = 0; j < m; j++) {
      scanf("%d", &k);
      p[i + j + 1].first = min(p[i + j + 1].first, k);
      p[i + j + 1].second = i + j + 1;
    }
  sort(p + 1, p + s + 1);
  for (i = 1; i <= s; i++) {
    ok[p[i].second] = 1;
    memset(dp, 0, sizeof(dp));
    dp[0][0] = 1;
    for (j = 1; j <= s; j++)
      for (k = 0; k <= s; k++) {
        if (ok[j] != 1) dp[j][k] += dp[j - 1][k + 1];
        if (ok[j] != 2 && k) dp[j][k] += dp[j - 1][k - 1];
        if (dp[j][k] > lim) dp[j][k] = lim + 1;
      }
    if (dp[s][0] < lim) lim -= dp[s][0], ok[p[i].second] = 2;
  }
  for (i = 0; i < n; i++) {
    for (j = 0; j < m; j++) {
      if (ok[i + j + 1] == 1)
        cout << "(";
      else
        cout << ")";
    }
    cout << endl;
  }
  return 0;
}
