#include <bits/stdc++.h>
using namespace std;
const int N = 200 + 77;
const long long inf = 1e18 + 1;
int n, m, p[N][N], t[N];
pair<int, int> a[N];
long long k, dp[N][N];
inline long long Get() {
  memset(dp, 0, sizeof(dp));
  dp[0][0] = 1;
  for (int i = 1; i <= n + m - 1; i++) {
    for (int j = 0; j <= n + m - 1; j++) {
      if (t[i] == 0) {
        dp[i][j] = dp[i - 1][j + 1];
        if (j > 0) {
          dp[i][j] += dp[i - 1][j - 1];
        }
        dp[i][j] = min(dp[i][j], inf);
        continue;
      }
      if (t[i] == 1) {
        if (j > 0) {
          dp[i][j] += dp[i - 1][j - 1];
        }
        dp[i][j] = min(dp[i][j], inf);
        continue;
      }
      dp[i][j] = dp[i - 1][j + 1];
    }
  }
  return dp[n + m - 1][0];
}
int main() {
  scanf("%d %d %I64d", &n, &m, &k);
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      scanf("%d", &p[i][j]);
    }
  }
  for (int i = 1; i <= n + m - 1; i++) {
    a[i].first = n * m;
    a[i].second = i;
    for (int j = 1; j <= n + m - 1; j++) {
      if (j > i || j > n || i - j + 1 > m) {
        continue;
      }
      a[i].first = min(a[i].first, p[j][i - j + 1]);
    }
  }
  sort(a + 1, a + n + m);
  for (int i = 1; i <= n + m - 1; i++) {
    t[a[i].second] = 1;
    long long g = Get();
    if (g < k) {
      t[a[i].second] = 2;
      k -= g;
    }
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      if (t[i + j - 1] == 1) {
        printf("(");
      } else {
        printf(")");
      }
    }
    printf("\n");
  }
  return 0;
}
