#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, m;
  long long k;
  cin >> n >> m >> k;
  int p = n + m - 1;
  int c[210];
  for (int i = 0; i < p; ++i) c[i] = 1e6;
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < m; ++j) {
      int tmp;
      cin >> tmp;
      --tmp;
      c[i + j] = min(c[i + j], tmp);
    }
  }
  string s;
  for (int i = 0; i < p; ++i) s += '0';
  long long dp[210][210];
  vector<pair<int, int> > cell;
  for (int i = 0; i < p; ++i) {
    cell.push_back(pair<int, int>(c[i], i));
  }
  sort(cell.begin(), cell.end());
  for (int i = 0; i < p; ++i) {
    s[cell[i].second] = '(';
    dp[0][0] = 1;
    for (int j = 1; j <= p; ++j) dp[0][j] = 0;
    for (int j = 1; j <= p; ++j) {
      for (int l = 0; l <= p; ++l) {
        dp[j][l] = 0;
        if (l != 0 && s[j - 1] != ')') dp[j][l] += dp[j - 1][l - 1];
        if (l != p && s[j - 1] != '(') dp[j][l] += dp[j - 1][l + 1];
        dp[j][l] = min(dp[j][l], k + 10);
      }
    }
    if (k > dp[p][0]) {
      s[cell[i].second] = ')';
      k -= dp[p][0];
    }
  }
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < m; ++j) {
      cout << s[i + j];
    }
    cout << '\n';
  }
  cout << endl;
  return 0;
}
