#include <bits/stdc++.h>
using namespace std;
template <class T>
inline T checkmin(T &a, T b) {
  return (a < b) ? a : a = b;
}
template <class T>
inline T checkmax(T &a, T b) {
  return (a > b) ? a : a = b;
}
template <class T>
T GCD(T a, T b) {
  if (a < 0) return GCD(-a, b);
  if (b < 0) return GCD(a, -b);
  return (a == 0) ? b : GCD(b % a, a);
}
template <class T>
T LCM(T a, T b) {
  if (a < 0) return LCM(-a, b);
  if (b < 0) return LCM(a, -b);
  return (a == 0 || b == 0) ? 0 : a / GCD(a, b) * b;
}
template <class T>
inline T sqr(T X) {
  return X * X;
}
namespace Poor {
const int MaxiN = 105;
const long long Infinity = 2000000000000000000LL;
int N, M;
long long K;
int C[MaxiN][MaxiN];
int Weight[MaxiN + MaxiN];
pair<int, int> List[MaxiN + MaxiN];
char St[MaxiN + MaxiN];
inline void Inc(long long &a, long long b) {
  a += b;
  if (a > Infinity) a = Infinity;
}
long long DP() {
  map<int, long long> Now, Suc;
  Now.clear();
  Now[0] = 1;
  for (int i = 0; i < N + M - 1; ++i) {
    for (typeof(Now.begin()) it = Now.begin(); it != Now.end(); ++it) {
      if (St[i] != ')') Inc(Suc[it->first + 1], it->second);
      if (St[i] != '(' && it->first > 0) Inc(Suc[it->first - 1], it->second);
    }
    Now = Suc;
    Suc.clear();
  }
  return Now[0];
}
void Run() {
  cin >> N >> M >> K;
  for (int i = 0; i < N; ++i)
    for (int j = 0; j < M; ++j) cin >> C[i][j];
  fill(Weight, Weight + N + M - 1, INT_MAX);
  for (int i = 0; i < N; ++i)
    for (int j = 0; j < M; ++j) checkmin(Weight[i + j], C[i][j]);
  for (int i = 0; i < N + M - 1; ++i) List[i] = make_pair(Weight[i], i);
  sort(List, List + N + M - 1);
  fill(St, St + N + M - 1, '?');
  for (int i = 0; i < N + M - 1; ++i) {
    int p = List[i].second;
    St[p] = '(';
    long long dp = DP();
    if (dp < K) {
      K -= dp;
      St[p] = ')';
    }
  }
  for (int i = 0; i < N; ++i) {
    for (int j = 0; j < M; ++j) putchar(St[i + j]);
    puts("");
  }
}
}  // namespace Poor
int main() {
  Poor::Run();
  return 0;
}
