#include <bits/stdc++.h>
using namespace std;
int L[610], R[610];
int mem[610][610];
int TC[610][610];
int dp(int id, int size) {
  if (size == 0) return true;
  if (mem[id][size] != -1) {
    return mem[id][size];
  }
  int st = 0;
  for (int i = L[id]; i <= R[id]; i++) {
    if (i % 2 == 0) continue;
    int en = st + i;
    int cnt = (en - st) / 2;
    int cnt2 = size - 1 - cnt;
    if (cnt2 < 0) break;
    if (dp(id + 1, cnt) && dp(id + 1 + cnt, cnt2)) {
      TC[id][size] = i;
      return mem[id][size] = true;
    }
  }
  return mem[id][size] = false;
}
string backtrack(int id, int size) {
  if (size == 0) return "";
  int d = TC[id][size];
  int st = 0, en = d;
  int cnt = (en - st) / 2;
  int cnt2 = size - 1 - cnt;
  return "(" + backtrack(id + 1, cnt) + ")" + backtrack(id + 1 + cnt, cnt2);
}
int main() {
  int N;
  cin >> N;
  for (int i = 0; i < N; ++i) {
    cin >> L[i] >> R[i];
  }
  memset(mem, -1, sizeof(mem));
  int p = dp(0, N);
  if (!p)
    cout << "IMPOSSIBLE" << endl;
  else {
    cout << backtrack(0, N) << endl;
  }
}
