#include <bits/stdc++.h>
using namespace std;
int a[1000][2];
int main() {
  ios_base::sync_with_stdio(false);
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i][0] >> a[i][1];
  }
  bool good = true;
  stack<char> s1, s2;
  for (int i = n - 1; i >= 0; i--) {
    int nest = 0;
    int num = 1;
    s2.push('(');
    while (nest != 0 || num < a[i][0]) {
      if (s1.empty()) {
        good = false;
        break;
      }
      if (s1.top() == '(')
        nest++;
      else
        nest--;
      s2.push(s1.top());
      s1.pop();
      num++;
      if (num > a[i][1]) {
        good = false;
        break;
      }
    }
    s2.push(')');
    while (!s2.empty()) {
      s1.push(s2.top());
      s2.pop();
    }
    if (!good) break;
  }
  if (!good)
    cout << "IMPOSSIBLE" << endl;
  else {
    while (!s1.empty()) {
      cout << s1.top();
      s1.pop();
    }
    cout << endl;
  }
  return 0;
}
