#include <bits/stdc++.h>
using namespace std;
const long long MARSHAL = 1000000000000000000LL;
int N, M, X;
long long K;
int prio[300];
pair<int, int> irvan[300];
char res[300];
long long dp[300][300];
long long solve() {
  memset(dp, 0, sizeof(dp));
  dp[X][0] = 1;
  for (int i = X - 1; i >= 0; i--)
    for (int j = 0; j <= X; j++) {
      if ((!res[i] || res[i] == '(') && j < X) dp[i][j] += dp[i + 1][j + 1];
      if ((!res[i] || res[i] == ')') && j > 0) dp[i][j] += dp[i + 1][j - 1];
      if (dp[i][j] >= MARSHAL) dp[i][j] = MARSHAL;
    }
  return dp[0][0];
}
int main() {
  cin >> N >> M >> K;
  X = N + M - 1;
  for (int i = 0; i < (int)X; i++) prio[i] = N * M;
  for (int i = 0; i < (int)N; i++)
    for (int j = 0; j < (int)M; j++) {
      int x;
      cin >> x;
      prio[i + j] = min(prio[i + j], x);
    }
  for (int i = 0; i < (int)X; i++) irvan[i] = make_pair(prio[i], i);
  sort(irvan, irvan + X);
  K--;
  for (int i = 0; i < (int)X; i++) {
    int pos = irvan[i].second;
    res[pos] = '(';
    long long jahja = solve();
    if (K >= jahja) {
      K -= jahja;
      res[pos] = ')';
    }
  }
  for (int i = 0; i < (int)N; i++) {
    for (int j = 0; j < (int)M; j++) printf("%c", res[i + j]);
    printf("\n");
  }
}
