#include <bits/stdc++.h>
using namespace std;
int n, p1[605], p2[605], ans[605 << 1];
int f[605][605], ch[605][605][2], g[605][605];
int check(int l, int r, int st) {
  if (l > r) return 1;
  if (f[l][r] != -1) return f[l][r];
  for (int i = p1[l]; i <= p2[l] && i < 2 * (r - l + 1); i += 2) {
    if (check(l + 1, l + (i - 1) / 2, st + 1) &&
        check(l + (i + 1) / 2, r, st + i + 1)) {
      g[l][r] = i;
      ch[l][r][0] = l + 1;
      if (l + (i + 1) / 2 <= r) ch[l][r][1] = l + (i + 1) / 2;
      return f[l][r] = 1;
    }
  }
  return f[l][r] = 0;
}
void print(int l, int r) {
  if (l > r) return;
  printf("(");
  print(l + 1, l + (g[l][r] - 1) / 2);
  printf(")");
  print(l + (g[l][r] + 1) / 2, r);
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d%d", &p1[i], &p2[i]);
    if (p1[i] % 2 == 0) p1[i]++;
  }
  memset(f, -1, sizeof f);
  for (int i = 1; i <= n; i++) {
    if (p1[i] > p2[i]) {
      printf("IMPOSSIBLE\n");
      return 0;
    }
  }
  if (check(1, n, 1)) {
    print(1, n);
    printf("\n");
  } else {
    printf("IMPOSSIBLE\n");
  }
  return 0;
}
