#include <bits/stdc++.h>
using namespace std;
long long int n, m, k;
const long long int INF = 2000000000000000000LL;
vector<int> p;
vector<int> pin;
string res;
long long int Count(const string& s) {
  vector<vector<long long int> > t(s.size() + 1,
                                   vector<long long int>(s.size() + 1));
  t[1][1] = 1;
  t[1][0] = 0;
  for (int i = 2; i <= s.size(); i++) {
    for (int j = 0; j <= i; j++) {
      long long int a = 0;
      if (j > 0) a = t[i - 1][j - 1];
      long long int b = 0;
      if (j + 1 <= i - 1) b = t[i - 1][j + 1];
      if (s[i - 1] == '_') t[i][j] = a + b;
      if (s[i - 1] == '(') t[i][j] = a;
      if (s[i - 1] == ')') t[i][j] = b;
      if (t[i][j] > INF) t[i][j] = INF;
    }
  }
  return t[s.size()][0];
}
int main() {
  cin >> n >> m >> k;
  p.resize(n + m - 1, 10000000);
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      int tmp;
      cin >> tmp;
      if (tmp < p[i + j]) {
        p[i + j] = tmp;
      }
    }
  }
  pin.resize(p.size());
  for (int i = 0, z = p.size(); i < z; i++) {
    pin[i] = i;
  }
  for (int i = 0, z = p.size(); i < z; i++) {
    for (int j = 0; j < i; j++) {
      if (p[j] > p[i]) {
        int tmp = p[j];
        p[j] = p[i];
        p[i] = tmp;
        tmp = pin[j];
        pin[j] = pin[i];
        pin[i] = tmp;
      }
    }
  }
  res.resize(p.size(), '_');
  res[0] = '(';
  res[res.size() - 1] = ')';
  for (int i = 0, z = pin.size(); i < z; i++) {
    int index = pin[i];
    if (res[index] != '_') {
      continue;
    }
    res[index] = '(';
    long long int count = Count(res);
    if (count >= k) {
      continue;
    }
    res[index] = ')';
    k -= count;
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      cout << res[i + j];
    }
    cout << endl;
  }
  return 0;
}
