#include <bits/stdc++.h>
using namespace std;
char res[110][110];
vector<pair<int, pair<int, int> > > a;
long long n, m, k;
long long INF = 3000000000000000000ll;
long long dp[210][210];
long long r(int num, int cnt) {
  if (num == n + m - 1) return (cnt == 0);
  if (cnt < 0) return 0;
  if (dp[num][cnt] != -1) return dp[num][cnt];
  int x, y;
  if (num < m) {
    x = 0;
    y = num;
  } else {
    x = num - m + 1;
    y = m - 1;
  }
  if (res[x][y] == '(') return dp[num][cnt] = r(num + 1, cnt + 1);
  if (res[x][y] == ')') return dp[num][cnt] = r(num + 1, cnt - 1);
  long long v = r(num + 1, cnt + 1) + r(num + 1, cnt - 1);
  if (v > INF) v = INF;
  return dp[num][cnt] = v;
}
int main() {
  cin >> n >> m >> k;
  for (int i = (0); i < (n); ++i)
    for (int j = (0); j < (m); ++j) {
      res[i][j] = '.';
      int c;
      scanf("%d", &c);
      a.push_back(make_pair(c, make_pair(i, j)));
    }
  sort(a.begin(), a.end());
  for (int i = (0); i < (a.size()); ++i) {
    int x = a[i].second.first;
    int y = a[i].second.second;
    if (res[x][y] == '.') {
      int x1 = x, y1 = y;
      while ((x1 < n) && (y1 >= 0)) {
        res[x1][y1] = '(';
        x1++;
        y1--;
      }
      x1 = x, y1 = y;
      while ((x1 >= 0) && (y1 < m)) {
        res[x1][y1] = '(';
        x1--;
        y1++;
      }
      memset(dp, -1, sizeof(dp));
      long long c = r(0, 0);
      if (c < k) {
        k -= c;
        int x1 = x, y1 = y;
        while ((x1 < n) && (y1 >= 0)) {
          res[x1][y1] = ')';
          x1++;
          y1--;
        }
        x1 = x, y1 = y;
        while ((x1 >= 0) && (y1 < m)) {
          res[x1][y1] = ')';
          x1--;
          y1++;
        }
      }
    }
  }
  for (int i = (0); i < (n); ++i) {
    for (int j = (0); j < (m); ++j) printf("%c", res[i][j]);
    printf("\n");
  }
  return 0;
}
