#include <bits/stdc++.h>
using namespace std;
const long long maxn = 205, inf = 2e18;
long long dp[maxn][maxn], priority[maxn];
bool cmp(long long i, long long j) { return priority[i] < priority[j]; }
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  long long a, b, k;
  cin >> a >> b >> k;
  long long n = a + b - 1;
  string s = "";
  vector<long long> P;
  for (long long i = 0; i < n; i++) {
    s += ' ';
    P.push_back(i);
  }
  fill(priority, priority + n, a * b + 1);
  for (long long i = 0; i < a; i++) {
    for (long long j = 0; j < b; j++) {
      long long c;
      cin >> c;
      priority[i + j] = min(priority[i + j], c);
    }
  }
  sort(P.begin(), P.end(), cmp);
  dp[0][0] = 1;
  for (long long i = 1; i <= n; i++) {
    dp[i][0] = dp[i - 1][1];
    for (long long j = 1; j <= i; j++) {
      dp[i][j] = min(inf, dp[i - 1][j - 1] + dp[i - 1][j + 1]);
    }
  }
  for (auto id : P) {
    dp[id + 1][0] = 0;
    for (long long j = 1; j <= id + 1; j++) dp[id + 1][j] = dp[id][j - 1];
    for (long long i = id + 2; i <= n; i++) {
      if (s[i - 1] == ' ') {
        dp[i][0] = dp[i - 1][1];
        for (long long j = 1; j <= i; j++) {
          dp[i][j] = min(inf, dp[i - 1][j - 1] + dp[i - 1][j + 1]);
        }
      } else if (s[i - 1] == '(') {
        dp[i][0] = 0;
        for (long long j = 1; j <= i; j++) {
          dp[i][j] = dp[i - 1][j - 1];
        }
      } else {
        for (long long j = 0; j <= i; j++) {
          dp[i][j] = dp[i - 1][j + 1];
        }
      }
    }
    if (dp[n][0] >= k) {
      s[id] = '(';
      continue;
    }
    k -= dp[n][0];
    for (long long j = 0; j <= id + 1; j++) dp[id + 1][j] = dp[id][j + 1];
    for (long long i = id + 2; i <= n; i++) {
      if (s[i - 1] == ' ') {
        dp[i][0] = dp[i - 1][1];
        for (long long j = 1; j <= i; j++) {
          dp[i][j] = min(inf, dp[i - 1][j - 1] + dp[i - 1][j + 1]);
        }
      } else if (s[i - 1] == '(') {
        dp[i][0] = 0;
        for (long long j = 1; j <= i; j++) {
          dp[i][j] = dp[i - 1][j - 1];
        }
      } else {
        for (long long j = 0; j <= i; j++) {
          dp[i][j] = dp[i - 1][j + 1];
        }
      }
    }
    s[id] = ')';
  }
  for (long long i = 0; i < a; i++) {
    for (long long j = 0; j < b; j++) {
      cout << s[i + j];
    }
    cout << '\n';
  }
}
