#include <bits/stdc++.h>
using namespace std;
const int N = 3 * 100 + 10;
long long n, m, k;
pair<int, int> t[N];
int b[N];
long long dp[N][N];
long long calc() {
  if (b[0] == 1)
    dp[0][1] = 1;
  else if (b[0] == 2)
    dp[0][0] = 0;
  else
    dp[0][1] = 1;
  for (int i = 1; i < n + m - 1; i++)
    for (int j = 0; j < min((int)(n + m - 1) / 2 + 1, i + 2); j++) {
      if (i - j + 1 > j)
        dp[i][j] = 0;
      else if (b[i] == 1)
        dp[i][j] = dp[i - 1][j - 1];
      else if (b[i] == 2)
        dp[i][j] = dp[i - 1][j];
      else
        dp[i][j] =
            min(1LL * (long long)1e18 + 1, dp[i - 1][j - 1] + dp[i - 1][j]);
    }
  return dp[n + m - 2][(n + m - 1) / 2];
}
int main() {
  ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  ;
  cin >> n >> m >> k;
  for (int i = 0; i < n + m; i++) t[i] = {n * m + 1, i};
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++) {
      int a;
      cin >> a;
      t[i + j].first = min(t[i + j].first, a);
    }
  sort(t, t + n + m - 1);
  long long sum = 0;
  for (int i = 0; i < n + m - 1; i++) {
    b[t[i].second] = 1;
    long long x = calc();
    if (sum + x < k) {
      b[t[i].second] = 2;
      sum += x;
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++)
      if (b[i + j] == 1)
        cout << "(";
      else
        cout << ")";
    cout << endl;
  }
  return 0;
}
