#include <bits/stdc++.h>
using namespace std;
template <typename T>
T chmin(T &a, T b) {
  return a = min(a, b);
}
template <typename T>
T chmax(T &a, T b) {
  return a = max(a, b);
}
int n;
int a[100010];
int l[100010], r[10001];
int st[100010];
int main() {
  cin >> n;
  for (int i = (0); i < (n); i++) cin >> l[i] >> r[i];
  for (int i = n - 1; i >= 0; i--) {
    int nl = l[i] / 2;
    int nr = (r[i] - 1) / 2;
    int c;
    for (c = 0; i + c < n;) {
      if (nl <= c && c <= nr) break;
      c += a[i + c + 1] + 1;
    }
    if (i + c >= n) {
      cout << "IMPOSSIBLE\n" << endl;
      return 0;
    }
    a[i] = c;
  }
  int p = 0;
  for (int i = (0); i < (n); i++) {
    st[p++] = a[i];
    cout << "(";
    while (p > 0 && st[p - 1] <= 0) {
      cout << ")";
      p--;
      for (int i = (0); i < (p); i++) st[i]--;
    }
  }
  cout << endl;
  return 0;
}
