#include <bits/stdc++.h>
using namespace std;
int xx[4] = {0, 0, 1, -1};
int yy[4] = {1, -1, 0, 0};
int n;
struct re {
  int l, r;
};
re a[int(600 + 50)];
bool f[int(600 + 50)][int(600 + 50)];
int dis[int(600 + 50)][int(600 + 50)];
pair<int, int> trace[int(600 + 50)][int(600 + 50)];
char res[int(600 + 50)];
void truyvet(int l, int r, int xx) {
  if (l > r) return;
  int x = trace[l][r].first;
  int y = trace[l][r].second;
  int d = dis[l][r];
  res[xx] = '(';
  res[xx + d] = ')';
  truyvet(x, y, xx + 1);
  truyvet(y + 1, r, xx + d + 1);
}
int main() {
  scanf("%d", &n);
  for (int i = (1), _b = (n); i <= _b; i++) scanf("%d%d", &a[i].l, &a[i].r);
  for (int i = (n), _a = (1); i >= _a; i--) {
    if (a[i].l == 1) f[i + 1][i] = true;
    for (int j = (i), _b = (n); j <= _b; j++) {
      for (int d = (a[i].l), _b = (a[i].r); d <= _b; d++)
        if (d % 2 == 1) {
          if (f[i + 1][i + d / 2] && f[i + d / 2 + 1][j]) {
            f[i][j] = true;
            trace[i][j] = pair<int, int>(i + 1, i + d / 2);
            dis[i][j] = d;
            break;
          }
        }
    }
  }
  if (!f[1][n]) {
    cout << "IMPOSSIBLE" << endl;
    return 0;
  }
  truyvet(1, n, 1);
  for (int i = (1), _b = (2 * n); i <= _b; i++) printf("%c", res[i]);
}
