#include <bits/stdc++.h>
const int pi = acos(-1.);
using namespace std;
const int N = 650;
int dp[N][N];
int match[N][N];
struct node {
  int l, r;
} seg[N];
int dfs(int l, int r) {
  if (l > r) {
    return 1;
  }
  if (dp[l][r]) {
    return dp[l][r];
  }
  for (int i = l; i <= r; i++) {
    int num = (i - l) * 2;
    if (num <= seg[l].r - 1 && num >= seg[l].l - 1) {
      if (dfs(l + 1, i) == 1 && dfs(i + 1, r) == 1) {
        match[l][r] = i;
        return dp[l][r] = 1;
      }
    }
  }
  return dp[l][r] = -1;
}
void print(int l, int r) {
  if (l > r) {
    return;
  }
  printf("(");
  print(l + 1, match[l][r]);
  printf(")");
  print(match[l][r] + 1, r);
}
int main() {
  int n;
  while (~scanf("%d", &n)) {
    for (int i = 1; i <= n; i++) scanf("%d%d", &seg[i].l, &seg[i].r);
    memset(dp, 0, sizeof(dp));
    dfs(1, n);
    if (dp[1][n] == -1)
      cout << "IMPOSSIBLE" << endl;
    else {
      print(1, n);
      cout << endl;
    }
  }
  return 0;
}
