#include <bits/stdc++.h>
using namespace std;
const int N = 605;
int dp[N][N];
int l[N], r[N];
string res;
void fill(int i, int j, int a, int b) {
  int k = j - i;
  if (i > j || a > b) return;
  if (l[i] <= 2 * k + 1 && 2 * k + 1 <= r[i] && (i == j || dp[i + 1][j])) {
    res[a] = '(', res[b] = ')';
    fill(i + 1, j, a + 1, b - 1);
  } else {
    for (int k = i; k < j; ++k)
      if (dp[i][k] && dp[k + 1][j]) {
        int diff = k - i + 1;
        fill(i, k, a, a + 2 * diff - 1);
        fill(k + 1, j, a + 2 * diff, b);
        break;
      }
  }
}
int main() {
  std::ios::sync_with_stdio(false);
  int n;
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    cin >> l[i] >> r[i];
  }
  memset(dp, 0, sizeof(dp));
  for (int i = n; i >= 1; --i) {
    for (int j = i; j <= n; ++j) {
      int k = j - i;
      if (l[i] <= 2 * k + 1 && 2 * k + 1 <= r[i] && (i == j || dp[i + 1][j]))
        dp[i][j] = 1;
      for (int k = i; k < j; ++k) dp[i][j] |= (dp[i][k] && dp[k + 1][j]);
    }
  }
  if (dp[1][n]) {
    res.resize(2 * n, '#');
    fill(1, n, 0, 2 * n - 1);
    cout << res << endl;
  } else {
    cout << "IMPOSSIBLE" << endl;
  }
  return 0;
}
