#include <bits/stdc++.h>
using namespace std;
int l[1500], r[1500];
int lp[1500];
int d[1500];
int bt[1500];
signed main() {
  int n, pn = 1, op = 1, tp;
  cin >> n;
  for (int i = 1, j = 0; i <= n; ++i) {
    cin >> l[i] >> r[i];
    d[++d[0]] = i;
    lp[i] = j;
    ++j;
    while (d[0]) {
      tp = d[d[0]];
      if (r[tp] + lp[tp] < j) {
        op = 0;
        break;
      }
      if (l[tp] + lp[tp] > j) {
        break;
      }
      bt[++j] = 1;
      --d[0];
    }
  }
  if (d[0] == 0 && op) {
    for (int i = 1; i <= (n << 1); ++i) cout << (bt[i] > 0 ? ")" : "(");
  } else
    cout << "IMPOSSIBLE";
  return 0;
}
