#include <bits/stdc++.h>
using namespace std;
const long long N = 1000005;
long long n, l[N], r[N], opos, s[N], spos;
char o[N];
signed main() {
  ios::sync_with_stdio(false);
  cin >> n;
  for (long long i = 1; i <= n; i++) {
    cin >> l[i] >> r[i];
  }
  for (long long i = 1; i <= n; i++) {
    o[++opos] = '(';
    s[++spos] = i;
    l[i] += opos;
    r[i] += opos;
    while (spos && l[s[spos]] <= opos + 1 && r[s[spos]] >= opos + 1) {
      --spos;
      o[++opos] = ')';
    }
  }
  if (opos == 2 * n) {
    for (long long i = 1; i <= opos; i++) cout << o[i];
  } else {
    puts("IMPOSSIBLE");
  }
}
