#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
const int INF = 1e9;
const long long INF64 = 7e18;
const long double EPS = 1e-9;
const long double PI = 3.14159265358979310000;
const long long MD = 535355424;
const long long T = 34539;
const int N = 200101;
const int M = 605;
int n;
pair<int, int> a[M];
string ss;
stack<pair<int, int> > s;
int main() {
  cin >> n;
  int z = 0;
  for (int i = 1; i <= n; i++) {
    cin >> a[i].first >> a[i].second;
    while (!s.empty() && s.top().first <= z + 1 && s.top().second >= z + 1) {
      z++;
      ss += ")";
      s.pop();
    }
    z++;
    ss += "(";
    s.push(make_pair(z + a[i].first, z + a[i].second));
  }
  while (!s.empty() && s.top().first <= z + 1 && s.top().second >= z + 1) {
    z++;
    ss += ")";
    s.pop();
  }
  if (!s.empty())
    cout << "IMPOSSIBLE";
  else
    cout << ss;
  return 0;
}
