#include <bits/stdc++.h>
using namespace std;
template <typename A, typename B>
string to_string(pair<A, B> p);
template <typename A, typename B, typename C>
string to_string(tuple<A, B, C> p);
template <typename A, typename B, typename C, typename D>
string to_string(tuple<A, B, C, D> p);
string to_string(const string& s) { return '"' + s + '"'; }
string to_string(const char* s) { return to_string((string)s); }
string to_string(bool b) { return (b ? "true" : "false"); }
string to_string(vector<bool> v) {
  bool first = true;
  string res = "{";
  for (int i = 0; i < static_cast<int>(v.size()); i++) {
    if (!first) {
      res += ", ";
    }
    first = false;
    res += to_string(v[i]);
  }
  res += "}";
  return res;
}
template <size_t N>
string to_string(bitset<N> v) {
  string res = "";
  for (size_t i = 0; i < N; i++) {
    res += static_cast<char>('0' + v[i]);
  }
  return res;
}
template <typename A>
string to_string(A v) {
  bool first = true;
  string res = "{";
  for (const auto& x : v) {
    if (!first) {
      res += ", ";
    }
    first = false;
    res += to_string(x);
  }
  res += "}";
  return res;
}
template <typename A, typename B>
string to_string(pair<A, B> p) {
  return "(" + to_string(p.first) + ", " + to_string(p.second) + ")";
}
template <typename A, typename B, typename C>
string to_string(tuple<A, B, C> p) {
  return "(" + to_string(get<0>(p)) + ", " + to_string(get<1>(p)) + ", " +
         to_string(get<2>(p)) + ")";
}
template <typename A, typename B, typename C, typename D>
string to_string(tuple<A, B, C, D> p) {
  return "(" + to_string(get<0>(p)) + ", " + to_string(get<1>(p)) + ", " +
         to_string(get<2>(p)) + ", " + to_string(get<3>(p)) + ")";
}
void dbg_out() { cout << endl; }
template <typename Head, typename... Tail>
void dbg_out(Head H, Tail... T) {
  cout << " " << to_string(H);
  dbg_out(T...);
}
int memo[600][600];
int n;
vector<pair<int, int>> in;
int dp(int i, int j) {
  if (i > j) return 1;
  if (memo[i][j] != -1) return memo[i][j];
  int lo = in[i].first / 2, hi = in[i].second;
  int len = j - i + 1;
  int ans = 0;
  for (int mid = lo; (mid << 1 | 1) <= hi && mid < len && !ans; mid++) {
    int first = dp(i + 1, i + mid), scnd = dp(i + mid + 1, j);
    ans |= (first & scnd);
  }
  return memo[i][j] = ans;
}
void trace(int i, int j) {
  if (i > j) return;
  int lo = in[i].first / 2, hi = in[i].second;
  int len = j - i + 1;
  for (int mid = lo; (mid << 1 | 1) <= hi && mid < len; mid++) {
    int first = dp(i + 1, i + mid), scnd = dp(i + mid + 1, j);
    if (first & scnd) {
      cout << "(";
      trace(i + 1, i + mid);
      cout << ")";
      trace(i + mid + 1, j);
      return;
    }
  }
}
void test_case() {
  cin >> n;
  in.resize(n);
  for (int i = 0; i < n; i++) {
    cin >> in[i].first >> in[i].second;
    for (int j = 0; j < n; j++) {
      memo[i][j] = -1;
    }
  }
  if (!dp(0, n - 1)) {
    cout << "IMPOSSIBLE" << endl;
    return;
  }
  trace(0, n - 1);
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  test_case();
  return 0;
}
