#include <bits/stdc++.h>
using namespace std;
struct sth {
  int p, l, r;
} a[601];
int n, i;
string s;
int z[1000], head = 0;
inline int read() {
  int x = 0, sig = 1;
  char ch = getchar();
  for (; !isdigit(ch); ch = getchar())
    if (ch == '-') sig = 0;
  for (; isdigit(ch); ch = getchar()) x = 10 * x + ch - '0';
  return sig ? x : -x;
}
inline void write(int x) {
  if (x == 0) {
    putchar('0');
    return;
  }
  if (x < 0) putchar('-'), x = -x;
  int len = 0, buf[15];
  while (x) buf[len++] = x % 10, x /= 10;
  for (int i = len - 1; i >= 0; i--) putchar(buf[i] + '0');
  return;
}
int main() {
  scanf("%d", &n);
  for (i = 1; i <= n; i++) {
    scanf("%d%d", &a[i].l, &a[i].r);
    a[i].p = s.size();
    head++;
    z[head] = i;
    s += '(';
    while (head > 0 && a[z[head]].p + a[z[head]].l <= s.size()) {
      if (a[z[head]].p + a[z[head]].r < s.size()) {
        cout << "IMPOSSIBLE";
        return 0;
      }
      s += ')';
      head--;
    }
  }
  if (head > 0) {
    cout << "IMPOSSIBLE";
    return 0;
  }
  cout << s;
}
