#include <bits/stdc++.h>
using namespace std;
const int MOD = 10;
const double eps = 1e-5;
const int maxN = 1000;
const int inf = 1e9;
stack<int> st;
string s;
int p[maxN], l[maxN], r[maxN], n;
inline void init() { cin >> n; }
inline void solve() {
  for (int i = 0; i < n; i++) {
    cin >> l[i] >> r[i];
    st.push(i);
    p[i] = s.length();
    s += '(';
    while (!st.empty() && p[st.top()] + l[st.top()] <= s.length()) {
      if (p[st.top()] + r[st.top()] < s.length()) {
        cout << "IMPOSSIBLE" << endl;
        return;
      }
      s += ')';
      st.pop();
    }
  }
  if (!st.empty())
    cout << "IMPOSSIBLE" << endl;
  else
    cout << s << endl;
}
int main() {
  ios_base::sync_with_stdio(0);
  init();
  solve();
  return 0;
}
