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