#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll INF = 1e18;
const int inf = 0x3f3f3f3f;
const int maxn = 105;
int n, m;
ll k;
int a[maxn][maxn];
int bracket[2 * maxn];
int mn[maxn * 2];
ll dp[205][105];
using pii = pair<int, int>;
priority_queue<pii, vector<pii>, greater<pii> > q;
ll solve() {
  dp[1][1] = 1;
  for (int i = 2; i <= n + m - 1; i++) {
    for (int j = 0; j <= 100; j++) {
      dp[i][j] = 0;
      if (bracket[i] == 0) {
        if (j >= 1) dp[i][j] = dp[i - 1][j - 1];
      } else if (bracket[i] == 1) {
        dp[i][j] = dp[i - 1][j + 1];
      } else {
        if (j >= 1) dp[i][j] += dp[i - 1][j - 1];
        dp[i][j] += dp[i - 1][j + 1];
        dp[i][j] = min(dp[i][j], INF);
      }
    }
  }
  return dp[n + m - 1][0];
}
int main() {
  ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  cin >> n >> m >> k;
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++) cin >> a[i][j];
  for (int i = 1; i <= m; i++) {
    mn[i] = inf;
    for (int j = 1; i - j + 1 >= 1 && j <= n; j++)
      mn[i] = min(mn[i], a[j][i - j + 1]);
  }
  for (int i = 2; i <= n; i++) {
    mn[m + i - 1] = inf;
    for (int j = 1; i + j - 1 <= n && m - j + 1 >= 1; j++)
      mn[m + i - 1] = min(mn[m + i - 1], a[i + j - 1][m - j + 1]);
  }
  for (int i = 2; i <= n + m - 2; i++) q.push({mn[i], i});
  memset(bracket, -1, sizeof bracket);
  bracket[1] = 0;
  bracket[n + m - 1] = 1;
  while (!q.empty()) {
    pii p = q.top();
    q.pop();
    bracket[p.second] = 0;
    ll num = solve();
    if (num >= k) continue;
    k -= num;
    bracket[p.second] = 1;
  }
  for (int i = 1; i <= m; i++) {
    for (int j = 1; i - j + 1 >= 1 && j <= n; j++) a[j][i - j + 1] = bracket[i];
  }
  for (int i = 2; i <= n; i++) {
    for (int j = 1; i + j - 1 <= n && m - j + 1 >= 1; j++)
      a[i + j - 1][m - j + 1] = bracket[m + i - 1];
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      if (a[i][j] == 0)
        cout << "(";
      else
        cout << ")";
    }
    cout << "\n";
  }
  return 0;
}
