#include <bits/stdc++.h>
using namespace std;
int INT_MAX_VAL = (int)1e20;
int INT_MIN_VAL = (int)-1e20;
long long LONG_MAX_VAL = (long long)1e20;
long long LONG_MIN_VAL = (long long)-1e20;
int l[605], r[605], p[605];
int main() {
  int n;
  cin >> n;
  stack<int> st;
  string s;
  for (long long(i) = 0LL; (i) < (n); (i)++) {
    cin >> l[i] >> r[i];
    p[i] = s.size();
    s += '(';
    st.push(i);
    while (!st.empty() && (p[st.top()] + l[st.top()] <= s.size())) {
      if (p[st.top()] + r[st.top()] < s.size()) {
        cout << "IMPOSSIBLE" << '\n';
        return 0;
      }
      s += ')';
      st.pop();
    }
  }
  if (!st.empty()) {
    cout << "IMPOSSIBLE" << '\n';
    return 0;
  }
  cout << s << '\n';
  return 0;
}
