#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  int l[601], r[601], pos[601];
  string ats;
  vector<int> S;
  for (int i = 0; i < n; i++) {
    cin >> l[i] >> r[i];
    pos[i] = ats.size();
    ats += "(";
    S.push_back(i);
    while (!S.empty() && pos[S.back()] + l[S.back()] <= ats.size()) {
      if (pos[S.back()] + r[S.back()] < ats.size())
        return cout << "IMPOSSIBLE\n", 0;
      ats += ")";
      S.pop_back();
    }
  }
  if (!S.empty()) return cout << "IMPOSSIBLE\n", 0;
  cout << ats;
}
