#include <bits/stdc++.h>
using namespace std;
template <class T1>
void deb(T1 e) {
  cout << e << endl;
}
template <class T1, class T2>
void deb(T1 e1, T2 e2) {
  cout << e1 << " " << e2 << endl;
}
template <class T1, class T2, class T3>
void deb(T1 e1, T2 e2, T3 e3) {
  cout << e1 << " " << e2 << " " << e3 << endl;
}
template <class T1, class T2, class T3, class T4>
void deb(T1 e1, T2 e2, T3 e3, T4 e4) {
  cout << e1 << " " << e2 << " " << e3 << " " << e4 << endl;
}
template <class T1, class T2, class T3, class T4, class T5>
void deb(T1 e1, T2 e2, T3 e3, T4 e4, T5 e5) {
  cout << e1 << " " << e2 << " " << e3 << " " << e4 << " " << e5 << endl;
}
template <class T1, class T2, class T3, class T4, class T5, class T6>
void deb(T1 e1, T2 e2, T3 e3, T4 e4, T5 e5, T6 e6) {
  cout << e1 << " " << e2 << " " << e3 << " " << e4 << " " << e5 << " " << e6
       << endl;
}
int dp[605][605];
int arr[605][2];
int solve(int pos, int last) {
  if (pos == last) return 1;
  if (pos > last) return 0;
  int &ret = dp[pos][last], i, baki;
  if (ret != -1) return ret;
  ret = 0;
  for (i = arr[pos][0]; i <= arr[pos][1]; i++) {
    if (i & 1) {
      baki = i / 2;
      if (baki + pos >= last) continue;
      ret = solve(pos + 1, pos + baki + 1) & solve(pos + baki + 1, last);
      if (ret) return ret;
    }
  }
  return ret;
}
void solve2(int pos, int last) {
  if (pos >= last) return;
  int ret, i, baki;
  for (i = arr[pos][0]; i <= arr[pos][1]; i++) {
    if (i & 1) {
      baki = i / 2;
      if (baki + pos >= last) continue;
      ret = solve(pos + 1, pos + baki + 1) & solve(pos + baki + 1, last);
      if (ret) {
        cout << "(";
        solve2(pos + 1, pos + baki + 1);
        cout << ")";
        solve2(pos + baki + 1, last);
        return;
      }
    }
  }
  return;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  ;
  memset(dp, -1, sizeof(dp));
  int i, j, n;
  cin >> n;
  for (i = 1; i <= n; i++) cin >> arr[i][0] >> arr[i][1];
  if (solve(1, n + 1)) {
    solve2(1, n + 1);
    return 0;
  }
  deb("IMPOSSIBLE");
  return 0;
}
