#include <bits/stdc++.h>
using namespace std;
int n;
const int maxn = 610;
pair<int, int> p[maxn];
bool dp[maxn][maxn];
int bk[maxn][maxn];
string go(int l, int r) {
  if (l > r) {
    return "";
  }
  if (l == r) {
    return "()";
  }
  string t = "(";
  t += go(l + 1, l + bk[l][r]);
  t += ')';
  t += go(l + bk[l][r] + 1, r);
  return t;
}
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> p[i].first >> p[i].second;
    if (p[i].first == 1) {
      dp[i][i] = 1;
    }
  }
  for (int i = 0; i <= n; i++) {
    for (int j = 0; j < i; j++) {
      dp[i][j] = 1;
    }
  }
  for (int len = 1; len < n; len++) {
    int r = len;
    for (int i = 0; r < n; i++, r++) {
      for (int k = 0; k <= r - i; k++) {
        if (p[i].first <= 2 * k + 1 && 2 * k + 1 <= p[i].second) {
          if (dp[i + 1][i + k] && dp[i + k + 1][r]) {
            dp[i][r] = 1;
            bk[i][r] = k;
            break;
          }
        }
      }
    }
  }
  if (!dp[0][n - 1]) {
    cout << "IMPOSSIBLE" << endl;
    return 0;
  }
  cout << go(0, n - 1) << endl;
  return 0;
}
