#include <bits/stdc++.h>
using namespace std;
int n, cnt;
stack<int> st;
int l[40100], r[40100], pos[40100];
char s[40100];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d%d", &l[i], &r[i]);
  for (int i = 1; i <= n; i++) {
    st.push(i);
    pos[i] = ++cnt;
    s[cnt] = '(';
    while (st.size()) {
      int k = st.top();
      if (pos[k] + l[k] > cnt + 1) break;
      if (pos[k] + r[k] < cnt + 1) {
        printf("IMPOSSIBLE");
        return 0;
      }
      s[++cnt] = ')';
      st.pop();
    }
  }
  if (st.size())
    printf("IMPOSSIBLE");
  else
    for (int i = 1; i <= n * 2; i++) printf("%c", s[i]);
  return 0;
}
