#include <bits/stdc++.h>
using namespace std;
inline void bad() {
  printf("IMPOSSIBLE");
  exit(0);
}
int main() {
  stack<int> st;
  int n, pos[600], l[600], r[600];
  string ans;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> l[i] >> r[i];
    pos[i] = ans.length();
    ans += '(';
    st.push(i);
    while (!st.empty()) {
      int br = st.top();
      if (pos[br] + l[br] > ans.length()) break;
      if (pos[br] + r[br] < ans.length()) bad();
      ans += ')';
      st.pop();
    }
  }
  if (!st.empty()) bad();
  cout << ans;
  return 0;
}
