#include <bits/stdc++.h>
using namespace std;
inline void readln(int &I) {
  I = 0;
  char C = getchar();
  while (!isdigit(C)) C = getchar();
  while (isdigit(C)) I = I * 10 + C - '0', C = getchar();
}
stack<pair<int, int>> s;
string ans;
int l[605], r[605], n, cur = 0;
int main() {
  readln(n);
  for (register int i = 1; i <= n; i++) readln(l[i]), readln(r[i]);
  for (register int i = 1; i <= n; i++) {
    s.push(make_pair(++cur, i)), ans += '(';
    while ((!s.empty()) and l[s.top().second] <= (cur - s.top().first + 1) and
           (cur - s.top().first + 1) <= r[s.top().second])
      ans += ')', s.pop(), cur++;
  }
  if (cur == 2 * n)
    puts(ans.c_str());
  else
    puts("IMPOSSIBLE");
}
