#include <bits/stdc++.h>
using namespace std;
inline int in() {
  int x;
  scanf("%d", &x);
  return x;
}
constexpr int N = 1500 + 7;
int a[N], b[N], dp[N][N], par[N][N];
inline int calc(int l, int r) {
  if (l == r + 1) return 1;
  if (l > r) return 0;
  int &ret = dp[l][r];
  if (ret != -1) return ret;
  ret = 0;
  for (int i = a[l]; i <= b[l]; i += 2)
    if (calc(l + 1, l + i / 2) && calc(l + i / 2 + 1, r)) {
      ret = 1;
      par[l][r] = i;
      break;
    }
  return ret;
}
char c[2 * N];
inline void print(int l, int r, int pos) {
  if (l > r) return;
  c[pos] = '(';
  c[pos + par[l][r]] = ')';
  print(l + 1, l + par[l][r] / 2, pos + 1);
  print(l + par[l][r] / 2 + 1, r, pos + par[l][r] + 1);
}
int32_t main() {
  int n = in();
  for (int i = 1; i <= n; i++) {
    a[i] = in(), b[i] = in();
    if (a[i] % 2 == 0) a[i]++;
    if (b[i] % 2 == 0) b[i]--;
    if (a[i] > b[i]) return cout << "IMPOSSIBLE", 0;
  }
  memset(dp, -1, sizeof dp);
  if (calc(1, n)) {
    print(1, n, 0);
    cout << c << endl;
  } else
    cout << "IMPOSSIBLE";
}
