#include <bits/stdc++.h>
using namespace std;
int dp[605][605];
bool vis[605][605];
int l[605], r[605];
int solve(int start, int end) {
  if (vis[start][end]) return dp[start][end];
  if (start > end) return -100;
  if (start == end) {
    if (l[start] == 1) {
      dp[start][end] = -100;
    }
    return dp[start][end];
  }
  for (int i = (l[start] - 1) / 2; i <= min((r[start] - 1) / 2, end - start);
       ++i) {
    if (solve(start + 1, start + i) != -1 && solve(start + i + 1, end) != -1) {
      dp[start][end] = start + i;
      break;
    }
  }
  vis[start][end] = true;
  return dp[start][end];
}
void print(int start, int end) {
  if (start > end) return;
  if (start == end) {
    cout << "()";
    return;
  }
  cout << "(";
  print(start + 1, dp[start][end]);
  cout << ")";
  print(dp[start][end] + 1, end);
}
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> l[i] >> r[i];
    if (l[i] % 2 == 0) l[i]++;
    if (r[i] % 2 == 0) r[i]--;
  }
  memset(vis, false, sizeof(vis));
  memset(dp, -1, sizeof(dp));
  solve(0, n - 1);
  if (dp[0][n - 1] != -1) {
    print(0, n - 1);
  } else {
    cout << "IMPOSSIBLE" << endl;
  }
  return 0;
}
