#include <bits/stdc++.h>
const int MAXN = 602;
const int INF = 1e9 + 7;
using namespace std;
int f[602][602];
string s;
int n;
pair<int, int> a[MAXN];
bool duyet(int l, int r) {
  if (l > r) return 1;
  if (f[l][r] > -1) return f[l][r];
  if (l == r) {
    f[l][r] = (a[l].first <= 1 && 1 <= a[l].second);
    return f[l][r];
  }
  bool ans = 0;
  for (int i = l; i <= r; i++)
    ans |= duyet(l + 1, i) && ((a[l].first + 1) <= (i - l + 1) * 2) &&
           ((i - l + 1) * 2 <= (a[l].second + 1)) && duyet(i + 1, r);
  f[l][r] = ans;
  return ans;
}
void calc(int l, int r) {
  if (l > r) return;
  for (int i = l; i <= r; i++)
    if (duyet(l + 1, i) && ((a[l].first + 1) <= (i - l + 1) * 2) &&
        ((i - l + 1) * 2 <= (a[l].second + 1)) && duyet(i + 1, r)) {
      cout << ("(");
      calc(l + 1, i);
      cout << ")";
      calc(i + 1, r);
      break;
    }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i].first >> a[i].second;
  memset(f, -1, sizeof(f));
  bool ok = duyet(1, n);
  if (!ok)
    cout << "IMPOSSIBLE";
  else {
    calc(1, n);
  }
  return 0;
}
