#include <bits/stdc++.h>
using namespace std;
int n, x, y;
struct Node {
  int i, l, r;
} node[601];
stack<struct Node> s;
string ans;
int cnt;
struct Node now;
void add() {
  now.i = ans.length();
  cin >> x >> y;
  now.l = x;
  now.r = y;
  ans += '(';
  s.push(now);
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n;
  cin >> x >> y;
  now.i = 0;
  now.l = x;
  now.r = y;
  s.push(now);
  ans += '(';
  cnt = 1;
  while (!s.empty()) {
    now = s.top();
    if (now.i + now.l <= ans.length() && ans.length() <= now.i + now.r) {
      ans += ')';
      s.pop();
      if (s.empty()) {
        cnt++;
        if (cnt > n) {
          break;
        } else
          add();
      }
    } else {
      cnt++;
      if (cnt > n) {
        cout << "IMPOSSIBLE" << endl;
        return 0;
      } else
        add();
    }
  }
  cout << ans << endl;
  return 0;
}
