#include <bits/stdc++.h>
using namespace std;
long n, l[1000], r[1000], tl, tr, id, ps;
string ans;
pair<long, long> tp;
stack<pair<long, long> > s;
long cur;
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> l[i] >> r[i];
  cur = 1;
  for (int i = 1; i <= n * 2; i++) {
    if (s.size() == 0)
      tl = tr = -1;
    else {
      tp = s.top();
      id = tp.first;
      ps = tp.second;
      tl = ps + l[id];
      tr = ps + r[id];
    }
    if (tl <= i && tr >= i) {
      s.pop();
      ans += ")";
      continue;
    }
    s.push(make_pair(cur, i));
    ++cur;
    ans += "(";
  }
  long cnt = 0;
  for (int i = 0; i < n * 2; i++)
    if (ans[i] == '(') ++cnt;
  if (cnt == n)
    cout << ans << endl;
  else
    cout << "IMPOSSIBLE" << endl;
  cin.get();
  cin.get();
  return 0;
}
