#include <bits/stdc++.h>
using namespace std;
long long ans[1202];
long long dp[601][601];
long long mem[601][601];
pair<long long, long long> p[601];
char ans2[1202];
bool findAns(long long st, long long en) {
  if (st > en) return 1;
  if (mem[st][en] != -1) {
    return mem[st][en];
  }
  mem[st][en] = 0;
  for (long long i = p[st].first; i <= p[st].second; i += 2) {
    long long x = i / 2;
    if (st + x > en) continue;
    if (findAns(st + 1, st + x) && findAns(st + 1 + x, en)) {
      dp[st][en] = x;
      mem[st][en] = 1;
      break;
    }
  }
  return mem[st][en];
}
void printAns(long long st, long long en) {
  if (st > en) return;
  ans[st] = 2 * dp[st][en] + 1;
  long long x = dp[st][en];
  printAns(st + 1, st + x);
  printAns(st + 1 + x, en);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n;
  cin >> n;
  for (long long i = 0, _n = (601); i < _n; i++) {
    for (long long j = 0, _n = (601); j < _n; j++) {
      mem[i][j] = -1;
    }
  }
  for (long long i = (1), _b = (n); i <= _b; i++) {
    cin >> p[i].first >> p[i].second;
    if (p[i].first % 2 == 0) p[i].first++;
  }
  bool xx = findAns(1, n);
  if (!xx) {
    cout << "IMPOSSIBLE" << endl;
    return 0;
  }
  printAns(1, n);
  for (long long i = (1), _b = (2 * n); i <= _b; i++) {
    ans2[i] = 'T';
  }
  long long p1 = 1;
  for (long long i = (1), _b = (n); i <= _b; i++) {
    while (ans2[p1] != 'T') p1++;
    ans2[p1] = '(';
    ans2[p1 + ans[i]] = ')';
  }
  for (long long i = (1), _b = (2 * n); i <= _b; i++) cout << ans2[i];
  cout << endl;
}
