#include <bits/stdc++.h>
using namespace std;
pair<long long, long long> a[202];
long long l, dp[202][202] = {1}, inf = 2e18;
string st;
long long first() {
  for (long long i = 0; i < l; i++)
    for (long long j = 0; j <= l; j++) {
      if (st[i] == '(') {
        if (j)
          dp[i + 1][j] = dp[i][j - 1];
        else
          dp[i + 1][j] = 0;
      } else if (st[i] == ')' || !j)
        dp[i + 1][j] = dp[i][j + 1];
      else
        dp[i + 1][j] = dp[i][j - 1] + dp[i][j + 1];
      dp[i + 1][j] = min(dp[i + 1][j], inf);
    }
  return dp[l][0];
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n, m, k, x, ans;
  cin >> n >> m >> k;
  l = n + m - 1;
  for (long long i = 0; i < l; i++) a[i] = {inf, i};
  for (long long i = 0; i < n; i++)
    for (long long j = 0; j < m; j++) {
      cin >> x;
      a[i + j].first = min(a[i + j].first, x);
    }
  sort(a, a + l);
  for (long long i = 0; i < l; i++) st += '?';
  for (long long i = 0; i < l; i++) {
    st[a[i].second] = '(';
    ans = first();
    if (ans < k) {
      k -= ans;
      st[a[i].second] = ')';
    }
  }
  for (long long i = 0; i < n; i++) {
    for (long long j = 0; j < m; j++) cout << st[i + j];
    cout << endl;
  }
  return 0;
}
