#include <bits/stdc++.h>
using namespace std;
int N, M, C, D, L[100005], R[100005];
char s[100005];
int main() {
  scanf("%d", &N);
  for (int i = 1; i <= N; i++) {
    D++;
    scanf("%d%d", &L[D], &R[D]);
    L[D] += C, R[D] += C, s[++C] = '(';
    for (; D && L[D] <= C && C <= R[D]; D--) s[++C] = ')';
  }
  puts(D ? "IMPOSSIBLE" : s + 1);
}
