#include <bits/stdc++.h>
using namespace std;
const long long int N = 100 + 10, MOD = 1e9 + 7, INF = 1e9, INFTAR = 1e18 + 5;
const long double PI = acos(-1);
int n, m, p[N][N];
pair<int, int> val[2 * N];
long long int k, dp[2 * N][N];
string s;
long long int FindAns(string xD) {
  dp[0][1] = ((xD[0] == '(') || (xD[0] == '?'));
  for (int i = 1; i < n + m - 1; i++) {
    for (int j = 0; j <= i + 1; j++) {
      dp[i][j] = 0;
      if (xD[i] == '(' && j) {
        dp[i][j] += dp[i - 1][j - 1];
      }
      if (xD[i] == ')') {
        dp[i][j] += dp[i - 1][j + 1];
      }
      if (xD[i] == '?' && j) {
        dp[i][j] += dp[i - 1][j - 1];
      }
      if (xD[i] == '?') {
        dp[i][j] += dp[i - 1][j + 1];
      }
      dp[i][j] = min(dp[i][j], INFTAR);
    }
  }
  return dp[n + m - 2][0];
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n >> m >> k;
  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 - 1; i++) {
    s += '?';
    val[i] = {INF, i};
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      val[i + j].first = min(val[i + j].first, p[i][j]);
    }
  }
  sort(val, val + n + m - 1);
  for (int i = 0; i < n + m - 1; i++) {
    s[val[i].second] = '(';
    long long int ans = FindAns(s);
    if (ans < k) {
      k -= ans;
      s[val[i].second] = ')';
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      cout << s[i + j];
    }
    cout << '\n';
  }
  return 0;
}
