#include <bits/stdc++.h>
using namespace std;
int l[607], r[607], n, pos[607];
char ans[607 << 1];
stack<int> s;
int main() {
  while (~scanf("%d", &n)) {
    while (!s.empty()) s.pop();
    int cnt = 0, i;
    bool flag = true;
    for (i = 0; i < n; i++) {
      scanf("%d%d", &l[i], &r[i]);
      s.push(i);
      pos[i] = cnt;
      ans[cnt++] = '(';
      while (!s.empty()) {
        int x = s.top();
        if (pos[x] + l[x] > cnt) break;
        if (pos[x] + r[x] < cnt) {
          flag = false;
          break;
        }
        ans[cnt++] = ')';
        s.pop();
      }
    }
    ans[cnt] = 0;
    if (flag && s.empty())
      printf("%s\n", ans);
    else
      puts("IMPOSSIBLE");
  }
}
