#include <bits/stdc++.h>
using namespace std;
const int N = 650;
int n, L[N], R[N];
int dp[N][N];
bool rec(int l, int r) {
  if (l > r) return 1;
  if (dp[l][r] != -1) return dp[l][r];
  for (int i = l; i <= r; i++) {
    int k = (i - l) * 2;
    if (k <= R[l] - 1) {
      if (k >= L[l] - 1)
        if (rec(l + 1, i) && rec(i + 1, r))
          return dp[l][r] = 1;
        else if (k + 1 == L[l] - 1) {
          cout << l << " " << r << " " << L[l] << " " << k << endl;
          while (1)
            ;
        }
    }
  }
  return dp[l][r] = 0;
}
void out(int l, int r) {
  if (l > r) return;
  for (int i = l; i <= r; i++) {
    int k = (i - l) * 2;
    if (k <= R[l] - 1 && k >= L[l] - 1)
      if (rec(l + 1, i) && rec(i + 1, r)) {
        cout << "(";
        out(l + 1, i);
        cout << ")";
        out(i + 1, r);
        return;
      }
  }
}
int main() {
  scanf("%d", &n);
  memset(dp, -1, sizeof dp);
  for (int i = 1; i <= n; i++) scanf("%d%d", &L[i], &R[i]);
  rec(1, n);
  if (!dp[1][n])
    cout << "IMPOSSIBLE";
  else
    out(1, n);
  return 0;
}
