#include <bits/stdc++.h>
using namespace std;
int n;
char dp[600][1202];
int l[600], r[600];
bool solve(int i, int len) {
  if (len == 0) return 1;
  if (len < 0 || i >= n) return 0;
  char &res = dp[i][len];
  if (res != -1) return res;
  res = 0;
  for (int end = l[i]; end <= r[i]; end += 2) {
    res |= solve(i + 1, end - 1) && solve(i + (end + 1) / 2, len - end - 1);
  }
  return res;
}
void build(int i, int len) {
  if (len == 0) return;
  if (len < 0 || i >= n) assert(false);
  for (int end = l[i]; end <= r[i]; end += 2) {
    if (solve(i + 1, end - 1) && solve(i + (end + 1) / 2, len - end - 1)) {
      putchar('(');
      build(i + 1, end - 1);
      putchar(')');
      build(i + (end + 1) / 2, len - end - 1);
      return;
    }
  }
  assert(false);
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) {
    scanf("%d %d", l + i, r + i);
    if (l[i] % 2 == 0) l[i]++;
  }
  memset(dp, -1, sizeof dp);
  bool ans = solve(0, n + n);
  if (ans) {
    build(0, n + n);
    putchar('\n');
  } else {
    puts("IMPOSSIBLE");
  }
  return 0;
}
