#include <bits/stdc++.h>
using namespace std;
const int nmax = 605;
int n, i, j, k, p, cnt, l[nmax], r[nmax], sol[nmax], dp[nmax][nmax];
char s[2 * nmax];
void go(int x, int y) {
  if (x == y) {
    sol[x] = 1;
    return;
  }
  sol[x] = dp[x][y];
  if (dp[x][y] == 1 || dp[x][y] == (y - x + 1) * 2 - 1)
    go(x + 1, y);
  else {
    go(x + 1, x + dp[x][y] / 2);
    go(x + dp[x][y] / 2 + 1, y);
  }
}
int main() {
  cin.sync_with_stdio(false);
  cin >> n;
  for (i = 1; i <= n; i++) {
    cin >> l[i] >> r[i];
    if (l[i] % 2 == 0) l[i]++;
    if (r[i] % 2 == 0) r[i]--;
    if (l[i] > r[i]) {
      cout << "IMPOSSIBLE";
      return 0;
    }
  }
  for (i = 1; i <= n; i++)
    if (l[i] == 1) dp[i][i] = 1;
  for (k = 2; k <= n; k++)
    for (i = 1, j = i + k - 1; j <= n; i++, j++) {
      for (p = l[i]; p <= r[i]; p += 2) {
        cnt = p / 2;
        if (cnt > j - i) break;
        if (cnt == 0) {
          if (dp[i + 1][j]) {
            dp[i][j] = p;
            break;
          }
        } else if (cnt < j - i) {
          if (dp[i + 1][i + cnt] && dp[i + cnt + 1][j]) {
            dp[i][j] = p;
            break;
          }
        } else if (cnt == j - i) {
          if (dp[i + 1][j]) {
            dp[i][j] = p;
            break;
          }
        }
      }
    }
  if (dp[1][n] == 0) {
    cout << "IMPOSSIBLE";
    return 0;
  }
  go(1, n);
  cnt = 0;
  for (i = 1; i <= 2 * n; i++)
    if (!s[i]) {
      cnt++;
      s[i] = '(';
      s[i + sol[cnt]] = ')';
    }
  cout << s + 1;
  return 0;
}
