#include <bits/stdc++.h>
using namespace std;
long long f[202][202];
int main() {
  int n, m;
  long long k;
  while (cin >> n >> m >> k) {
    int l = n + m - 1;
    vector<int> a(202), d(202);
    for (int i = 0; i < l; i++) {
      a[i] = n * m;
      d[i] = i;
    }
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) {
        int x;
        cin >> x;
        if (a[i + j] > x) {
          a[i + j] = x;
        }
      }
    }
    sort(begin(d), begin(d) + l,
         [&a](const int& i, const int& j) { return a[i] < a[j]; });
    string s = string(202, '\0');
    memset(f, 0, sizeof f);
    for (int I = 0; I < l; I++) {
      s[d[I]] = '(';
      f[0][0] = 1;
      for (int i = 0; i < l; i++) {
        for (int j = i & 1; j <= i && j <= l - i; j += 2) {
          if (f[i][j]) {
            if (f[i][j] > k) {
              f[i][j] = k;
            }
            if (s[i] != ')') {
              f[i + 1][j + 1] += f[i][j];
            }
            if (s[i] != '(' && j) {
              f[i + 1][j - 1] += f[i][j];
            }
            f[i][j] = 0;
          }
        }
      }
      if (k > f[l][0]) {
        k -= f[l][0];
        s[d[I]] = ')';
      }
      f[l][0] = 0;
    }
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) {
        cout << s[i + j];
      }
      cout << "\n";
    }
  }
}
