#include <bits/stdc++.h>
using namespace std;
const long long N = 600 + 10;
int L[N], R[N], n;
bool dp[N][N];
string s[N][N];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> L[i] >> R[i];
    if (L[i] == 1) {
      dp[i][i] = true;
      s[i][i] = "()";
    }
    dp[i][i - 1] = true;
    s[i][i - 1] = "";
  }
  dp[n + 1][n] = true;
  s[n + 1][n] = "";
  for (int d = 1; d < n; d++) {
    for (int i = 1; i <= n - d; i++) {
      int j = i + d;
      for (int k = L[i]; k <= R[i]; k++) {
        if (k % 2 == 1 && dp[i + 1][i + ((k - 1) / 2)] &&
            dp[i + ((k + 1) / 2)][j]) {
          dp[i][j] = true;
          s[i][j] =
              "(" + s[i + 1][i + ((k - 1) / 2)] + ")" + s[i + ((k + 1) / 2)][j];
          break;
        }
      }
    }
  }
  if (dp[1][n]) {
    cout << s[1][n];
  } else {
    cout << "IMPOSSIBLE";
  }
  return 0;
}
