#include <bits/stdc++.h>
using namespace std;
const int oo = 0x3f3f3f3f;
const double eps = 1e-9;
const int maxN = 600 + 8;
int N;
int L[maxN], R[maxN];
int dp[maxN][maxN];
int main() {
  ios::sync_with_stdio(false);
  cin >> N;
  for (int n = (0); n < (N); n++) cin >> L[n] >> R[n];
  for (int i = (0); i < (N); i++) {
    if ((L[i] & 1) == 0) L[i]++;
    if ((R[i] & 1) == 0) R[i]--;
    L[i] = (L[i] + 1) / 2;
    R[i] = (R[i] + 1) / 2;
  }
  for (int i = (0); i < (N); i++)
    if (L[i] <= 1 && R[i] >= 1) dp[i][i + 1] = -1;
  for (int d = (2); d < (N + 1); d++)
    for (int i = (0); i < (N - d + 1); i++) {
      int j = i + d;
      if (L[i] <= d && R[i] >= d && dp[i + 1][j]) {
        dp[i][j] = -2;
        continue;
      }
      for (int k = (i + 1); k < (j); k++) {
        if (dp[i][k] && dp[k][j]) {
          dp[i][j] = k;
          break;
        }
      }
    }
  if (!dp[0][N]) {
    cout << "IMPOSSIBLE" << endl;
    exit(0);
  }
  string result(2 * N, '.');
  function<void(int, int, int, int)> f = [&f, &result](int i, int j, int a,
                                                       int b) {
    int k = dp[i][j];
    if (k < 0) {
      result[a] = '(';
      result[b - 1] = ')';
      if (i + 1 < j) f(i + 1, j, a + 1, b - 1);
    } else {
      int m = (k - i) * 2;
      f(i, k, a, a + m);
      f(k, j, a + m, b);
    }
  };
  f(0, N, 0, 2 * N);
  cout << result << endl;
}
