#include <bits/stdc++.h>
using namespace std;
bool dp[601][601] = {0};
int mid[601][601] = {0};
int L[600], R[600];
string ans = "";
void print(int l, int r) {
  if (l == r)
    return;
  else {
    ans += '(';
    print(l + 1, mid[l][r]);
    ans += ')';
    print(mid[l][r], r);
    return;
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  for (int i = 0; i < n; ++i) cin >> L[i] >> R[i];
  for (int i = 0; i <= n; ++i) dp[i][i] = true;
  for (int d = 1; d <= n; ++d)
    for (int l = 0; l + d <= n; ++l) {
      int r = l + d;
      for (int m = l + 1; m <= r and not dp[l][r]; ++m) {
        int t = (m - l - 1) * 2 + 1;
        dp[l][r] |= L[l] <= t and t <= R[l] and dp[l + 1][m] and dp[m][r];
        if (L[l] <= t and t <= R[l] and dp[l + 1][m] and dp[m][r]) {
          dp[l][r] = true;
          mid[l][r] = m;
        }
      }
    }
  if (not dp[0][n])
    cout << "IMPOSSIBLE\n";
  else
    print(0, n), cout << ans << '\n';
}
