#include <bits/stdc++.h>
using namespace std;
const int INF = (int)1E9;
int N;
int li[605], ri[605];
int dp[605][605];
int solve(int l, int r) {
  if (l > r) return 0;
  assert(l >= 1 && r >= 1 && l <= N && r <= N);
  if (dp[l][r] != -2) return dp[l][r];
  if (l == r) {
    if (li[l] == 1) return dp[l][r] = 0;
    return dp[l][r] = -1;
  }
  int dl = li[l], dr = ri[l];
  for (int d = dl; d <= dr; d += 2) {
    int pmid = d / 2;
    if (l + pmid > r) break;
    int solmid = solve(l + 1, l + pmid);
    int solr = solve(l + pmid + 1, r);
    if (solmid != -1 && solr != -1) {
      return dp[l][r] = pmid;
    }
  }
  return dp[l][r] = -1;
}
void get(int l, int r) {
  if (l > r) return;
  printf("(");
  int pmid = dp[l][r];
  get(l + 1, l + pmid);
  printf(")");
  get(l + pmid + 1, r);
}
int main() {
  cin >> N;
  for (int i = (1); i < (N + 1); i++)
    for (int j = (1); j < (N + 1); j++) dp[i][j] = -2;
  for (int i = (1); i < (N + 1); i++) {
    scanf("%d%d", li + i, ri + i);
    if (li[i] % 2 == 0) li[i]++;
    if (ri[i] % 2 == 0) ri[i]--;
  }
  solve(1, N);
  if (dp[1][N] == -1) {
    puts("IMPOSSIBLE");
  } else {
    get(1, N);
    puts("");
  }
  return 0;
}
