#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<pair<int, int> > v(N);
  for (int i = 0; i < N; i++) {
    cin >> v[i].first >> v[i].second;
    v[i].first -= 1;
    v[i].second -= 1;
  }
  reverse(v.begin(), v.end());
  vector<string> ret;
  for (int i = 0; i < v.size(); i++) {
    string curr;
    while (ret.size() > 0 && curr.size() < v[i].first) {
      curr += ret.back();
      ret.pop_back();
    }
    if (curr.size() < v[i].first || curr.size() > v[i].second) {
      cout << "IMPOSSIBLE" << endl;
      return 0;
    }
    curr = "(" + curr + ")";
    ret.push_back(curr);
  }
  for (int i = ret.size() - 1; i >= 0; i--) cout << ret[i];
  cout << endl;
  return 0;
}
