#include <bits/stdc++.h>
#pragma comment(linker, "/stack:64000000")
using namespace std;
const unsigned long long INF = 1001001001001001001LL;
struct st {
  int i, j, p;
  st() {}
  st(int i, int j, int p) : i(i), j(j), p(p) {}
};
bool operator<(const st& a, const st& b) { return a.p < b.p; }
vector<st> a;
int used[300], n, m;
unsigned long long d[300][300], k;
unsigned long long calc() {
  memset(d, 0, sizeof d);
  d[0][0] = 1;
  for (int i = 0; i < (int)n + m - 1; i++)
    for (int j = 0; j < (int)i + 1; j++) {
      if (d[i][j] == 0) continue;
      if (used[i] != -1) {
        d[i + 1][j + 1] += d[i][j];
        if (d[i + 1][j + 1] > INF) d[i + 1][j + 1] = INF;
      }
      if (j > 0 && used[i] != 1) {
        d[i + 1][j - 1] += d[i][j];
        if (d[i + 1][j + 1] > INF) d[i + 1][j + 1] = INF;
      }
    }
  return d[n + m - 1][0];
}
int main() {
  cin >> n >> m >> k;
  k--;
  for (int i = 0; i < (int)n; i++)
    for (int j = 0; j < (int)m; j++) {
      int v;
      cin >> v;
      a.push_back(st(i, j, v));
    }
  sort((a).begin(), (a).end());
  for (int i = 0; i < (int)(int)(a).size(); i++) {
    while (i < (int)(a).size() && used[a[i].i + a[i].j]) i++;
    if (i == (int)(a).size()) break;
    int pos = a[i].i + a[i].j;
    used[pos] = 1;
    unsigned long long cur = calc();
    if (k >= cur) {
      used[pos] = -1;
      k -= cur;
    }
  }
  for (int i = 0; i < (int)n; i++) {
    for (int j = 0; j < (int)m; j++)
      if (used[i + j] == 1)
        cout << "(";
      else
        cout << ")";
    cout << endl;
  }
}
