#include <bits/stdc++.h>
using namespace std;
int l[1001], r[1001], pos[1001];
int main() {
  int n;
  string ans;
  stack<int> s;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> l[i] >> r[i];
    pos[i] = ans.length();
    ans += '(';
    s.push(i);
    while (!s.empty() && pos[s.top()] + l[s.top()] <= ans.length()) {
      if (pos[s.top()] + r[s.top()] < ans.length()) {
        cout << "IMPOSSIBLE" << endl;
        return 0;
      }
      ans += ')';
      s.pop();
    }
  }
  if (s.empty())
    cout << ans << endl;
  else
    cout << "IMPOSSIBLE" << endl;
  return 0;
}
