#include <bits/stdc++.h>
using namespace std;
int n, m;
signed long long k;
const signed long long INF = 1000000000000000000 + 50;
signed long long Licz(string nap) {
  int n = nap.size();
  vector<vector<signed long long> > dp(n + 1,
                                       vector<signed long long>(n + 1, 0));
  if (nap[0] == '?' || nap[0] == '(') dp[1][1] = 1;
  for (int i = 1; i < n; ++i) {
    for (int otw = 1; otw <= n; ++otw) {
      int zam = i - otw;
      if (nap[i] == '?') {
        if (otw + 1 >= zam) dp[i + 1][otw + 1] += dp[i][otw];
        if (otw >= zam + 1) dp[i + 1][otw] += dp[i][otw];
      }
      if (nap[i] == '(')
        if (otw + 1 >= zam) dp[i + 1][otw + 1] += dp[i][otw];
      if (nap[i] == ')')
        if (otw >= zam + 1) dp[i + 1][otw] += dp[i][otw];
      if (dp[i + 1][otw] >= INF) dp[i + 1][otw] = INF;
      if (dp[i + 1][otw + 1] >= INF) dp[i + 1][otw + 1] = INF;
    }
  }
  return dp[n][n / 2];
}
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n >> m >> k;
  vector<int> prio(n * m);
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < m; ++j) {
      int p;
      cin >> p;
      --p;
      prio[p] = i + j;
    }
  }
  string odp(n + m - 1, '?');
  for (int i = 0; i < n * m; ++i) {
    if (odp[prio[i]] == '?') {
      odp[prio[i]] = '(';
      signed long long ile = Licz(odp);
      if (ile < k) {
        odp[prio[i]] = ')';
        k -= ile;
      }
    }
  }
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < m; ++j) cout << odp[i + j];
    cout << endl;
  }
  return 0;
}
