#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e18 + 10;
const int N = 200 + 10;
long long k, dp[N][N];
int n, m, a[N];
char c[N];
bool isValid(int id) {
  c[id] = '(', dp[n + m - 1][0] = 1;
  for (int i = n + m - 2; ~i; i--)
    for (int j = 0; j < n + m; j++)
      if (c[i] == '(')
        dp[i][j] = dp[i + 1][j + 1];
      else if (c[i] == ')')
        dp[i][j] = dp[i + 1][j - 1];
      else
        dp[i][j] = min(dp[i + 1][j + 1] + dp[i + 1][j - 1], INF);
  return k <= dp[0][0];
}
void readInput() {
  cin >> n >> m >> k;
  memset(a, 63, sizeof a);
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++) {
      int x;
      cin >> x;
      a[i + j] = min(a[i + j], x);
    }
}
void solve() {
  vector<pair<int, int>> vec;
  for (int i = 0; i < n + m - 1; i++) vec.push_back({a[i], i});
  sort(vec.begin(), vec.end());
  for (auto x : vec)
    if (!isValid(x.second)) c[x.second] = ')', k -= dp[0][0];
}
void writeOutput() {
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) cout << c[i + j];
    cout << endl;
  }
}
int main() {
  ios_base ::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  readInput(), solve(), writeOutput();
  return 0;
}
