#include <bits/stdc++.h>
using namespace std;
const int maxn = 100005;
int n;
int dis[605][2];
int dp[605][605];
int pre[605][605];
void print(int a, int b) {
  if (a == b) {
    printf("()");
    return;
  }
  if (dp[a][b] == 2) {
    printf("(");
    print(a + 1, b);
    printf(")");
  } else if (dp[a][b] == 1) {
    print(a, pre[a][b]);
    print(pre[a][b] + 1, b);
  }
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d%d", &dis[i][0], &dis[i][1]);
  memset(dp, -1, sizeof(dp));
  memset(pre, -1, sizeof(pre));
  for (int i = 1; i <= n; i++) {
    if (1 >= dis[i][0] && 1 <= dis[i][1]) {
      dp[i][i] = 1;
      pre[i][i] = i;
    }
  }
  for (int len = 2; len <= n; len++) {
    for (int i = 1; i + len - 1 <= n; i++) {
      int j = i + len - 1;
      if (dp[i + 1][j] >= 0 && (j - i) * 2 >= dis[i][0] - 1 &&
          (j - i) * 2 <= dis[i][1] - 1) {
        dp[i][j] = 2;
        pre[i][j] = 0;
        continue;
      }
      for (int k = i; k <= j; k++) {
        if (dp[i][k] >= 0 && dp[k + 1][j] >= 0) {
          dp[i][j] = 1;
          pre[i][j] = k;
          break;
        }
      }
    }
  }
  if (dp[1][n] == -1)
    printf("IMPOSSIBLE\n");
  else
    print(1, n);
  return 0;
}
