#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:300000000")
using namespace std;
const double pi = 3.1415926535897932384626433832795;
template <class T>
T myabs(T a) {
  return a >= 0 ? a : -a;
};
template <class T>
T sqr(T x) {
  return x * x;
}
int n, m;
long long k, curK;
string ans;
vector<vector<int> > p;
long long dp[210][210];
double dpAppr[210][210];
double d;
long long inf = 2LL * 1000000000 * 1000000000;
long long getCnt(string &s) {
  memset(dp, 0, sizeof(dp));
  memset(dpAppr, 0, sizeof(dpAppr));
  dp[0][0] = 1;
  dpAppr[0][0] = 1;
  for (int i = 1; i <= ((int)(s).size()); i++) {
    for (int j = 0; j < ((int)(s).size()) / 2 + 1; j++) {
      if (s[i - 1] != '(') {
        dp[i][j] += dp[i - 1][j + 1];
        dpAppr[i][j] += dpAppr[i - 1][j + 1];
      }
      if (s[i - 1] != ')') {
        if (j != 0) {
          dp[i][j] += dp[i - 1][j - 1];
          dpAppr[i][j] += dpAppr[i - 1][j - 1];
        }
      }
    }
  }
  if (dpAppr[((int)(s).size())][0] >= inf) return inf;
  return dp[((int)(s).size())][0];
}
int cx, cy;
void getCell() {
  int mi = 999999;
  for (int i = 0; i < (n); i++)
    for (int j = 0; j < (m); j++) {
      if (p[i][j] < mi) {
        mi = p[i][j];
        cx = i;
        cy = j;
      }
    }
}
int main() {
  cin >> n >> m >> k;
  k--;
  curK = 0;
  ans.resize(n + m - 1, '?');
  p.resize(n, vector<int>(m));
  for (int i = 0; i < (n); i++)
    for (int j = 0; j < (m); j++) cin >> p[i][j];
  for (int i = 0; i < (n * m); i++) {
    getCell();
    p[cx][cy] = 999999;
    int ind = cx + cy;
    if (ans[ind] != '?') continue;
    ans[ind] = '(';
    long long t = getCnt(ans);
    if (curK + t <= k) {
      curK += t;
      ans[ind] = ')';
    }
  }
  for (int i = 0; i < (n); i++) {
    for (int j = 0; j < (m); j++) cout << ans[i + j];
    cout << endl;
  }
}
