#include <bits/stdc++.h>
using namespace std;
const int N = 601;
string ans;
int L[N], R[N];
int memo[N][N];
int solve(int l, int r) {
  if (l > r) return 1;
  int &res = memo[l][r];
  if (res != -1) return res;
  res = 0;
  for (int i = ((L[l] + 2) / 2) * 2; i <= min(R[l] + 1, 2 * (r - l + 1));
       i += 2) {
    int d = (i - 2) / 2;
    res |= solve(l + 1, l + d) & solve(l + d + 1, r);
    if (res) break;
  }
  return res;
}
void go(int idx, int l, int r) {
  if (l > r) return;
  for (int i = ((L[l] + 2) / 2) * 2; i <= min(R[l] + 1, 2 * (r - l + 1));
       i += 2) {
    int d = (i - 2) / 2;
    bool ok = true;
    if (l + d >= l + 1 && !memo[l + 1][l + d]) ok = false;
    if (r >= l + d + 1 && !memo[l + d + 1][r]) ok = false;
    if (ok) {
      ans[idx - 1] = '(';
      ans[i - 1 + idx - 1] = ')';
      go(idx + 1, l + 1, l + d);
      go(i + idx, l + d + 1, r);
      break;
    }
  }
}
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i < n + 1; i++) {
    scanf("%d%d", &L[i], &R[i]);
  }
  memset(memo, -1, sizeof(memo));
  if (!solve(1, n)) {
    printf("IMPOSSIBLE\n");
    return 0;
  }
  for (int i = 0; i < 2 * n; i++) ans += '#';
  go(1, 1, n);
  cout << ans << endl;
  return 0;
}
