#include <bits/stdc++.h>
using namespace std;
const int inf = (int)1e9;
const double pi = acos(-1.0);
const double eps = 1e-9;
int sz, n, l[200100], w[200100], r[200100];
string res;
stack<int> st;
int main() {
  cin >> n;
  int ps = 1;
  for (int i = 1; i <= n; i++) cin >> l[i] >> r[i];
  for (int i = 1; i <= n + n; i++) {
    if (st.empty()) {
      st.push(ps);
      w[sz++] = res.length();
      ps++;
      res += '(';
      continue;
    }
    int pos = res.length();
    if (sz > 0 && pos - w[sz - 1] >= l[st.top()] &&
        pos - w[sz - 1] <= r[st.top()]) {
      sz--;
      st.pop();
      res += ')';
    } else {
      st.push(ps);
      ps++;
      w[sz++] = res.length();
      res += '(';
      continue;
    }
  }
  if (sz != 0) {
    cout << "IMPOSSIBLE\n";
    return 0;
  }
  cout << res << endl;
  return 0;
}
