#include <bits/stdc++.h>
#pragma GCC optimize(3)
#pragma GCC optimize(2)
using namespace std;
int n, r;
bool dp[666][666];
int fang[666][666];
pair<int, int> ku[666];
void dfs(int x, int y) {
  if (x == y)
    cout << "()";
  else if (fang[x][y] == -1) {
    cout << "(";
    dfs(x + 1, y);
    cout << ")";
  } else {
    dfs(x, fang[x][y]);
    dfs(fang[x][y] + 1, y);
  }
}
signed main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  memset(dp, 0, sizeof dp);
  cin >> n;
  for (register int i = 1; (1 < n) ? (i <= n) : (i >= n);
       i += (1 < n) ? 1 : (-1))
    cin >> ku[i].first >> ku[i].second;
  for (register int i = 1; (1 < n) ? (i <= n) : (i >= n);
       i += (1 < n) ? 1 : (-1))
    dp[i][i] = (bool)(ku[i].first == 1);
  for (register int i = 2; (2 < n) ? (i <= n) : (i >= n);
       i += (2 < n) ? 1 : (-1)) {
    for (register int l = 1;
         (1 < n - i + 1) ? (l <= n - i + 1) : (l >= n - i + 1);
         l += (1 < n - i + 1) ? 1 : (-1)) {
      r = l + i - 1;
      if (dp[l + 1][r] && ku[l].first - 1 <= (r - l) * 2 &&
          (r - l) * 2 <= ku[l].second - 1) {
        dp[l][r] = 1;
        fang[l][r] = -1;
      } else {
        for (register int k = l; (l < r - 1) ? (k <= r - 1) : (k >= r - 1);
             k += (l < r - 1) ? 1 : (-1)) {
          if (dp[l][k] && dp[k + 1][r]) {
            dp[l][r] = 1;
            fang[l][r] = k;
            break;
          }
        }
      }
    }
  }
  if (dp[1][n]) {
    dfs(1, n);
    cout << endl;
  } else
    cout << "IMPOSSIBLE" << endl;
  return 0;
}
