#include <bits/stdc++.h>
using namespace std;
long long _10p18 = 1000000000;
long long n, m, p[110][110], P[2 * 110];
long long k;
vector<pair<long long, long long> > vp;
long long res[2 * 110];
long long f[2 * 110][110];
long long ololo() {
  memset(f, 0, sizeof(long long) * 2 * 110 * 110);
  f[0][1] = 1;
  for (int j = 0; j < n + m - 2; j++) {
    for (int i = 0; i < 110 - 1; i++) {
      if (f[j][i] == 0) continue;
      if (res[j + 1] == 1 || res[j + 1] == 0)
        f[j + 1][i + 1] = min(f[j + 1][i + 1] + f[j][i], _10p18);
      if ((res[j + 1] == 2 || res[j + 1] == 0) && i - 1 >= 0)
        f[j + 1][i - 1] = min(f[j + 1][i - 1] + f[j][i], _10p18);
    }
  }
  return f[n + m - 2][0];
}
int main() {
  _10p18 *= _10p18;
  _10p18 += 20;
  cin >> n >> m >> k;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      cin >> p[i][j];
      if (P[i + j] == 0)
        P[i + j] = p[i][j];
      else
        P[i + j] = min(P[i + j], p[i][j]);
    }
  }
  for (int i = 0; i < n + m - 1; i++) vp.push_back(make_pair(P[i], i));
  sort(vp.begin(), vp.end());
  for (int i = 0; i < vp.size(); i++) {
    res[vp[i].second] = 1;
    long long x;
    if (k > (x = ololo())) {
      k -= x;
      res[vp[i].second] = 2;
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (res[i + j] == 1)
        cout << '(';
      else
        cout << ')';
    }
    cout << endl;
  }
  return 0;
}
