#include <bits/stdc++.h>
using namespace std;
char ch[1100000];
char ch2[1100000];
vector<pair<char,char>> ans;
int main() {
//ifstream in("input.txt");
//cin.rdbuf(in.rdbuf());
int n,k;
cin >> n >> k;
if ((k % 2 != 0) || (n % 2 != 0)) {
cout << "IMPOSSIBLE\n";
return;
}
for (int i = 0; i < n; i++)
{
if (i % 2 == 0) ch[i] = '(';
else ch[i] = ')';
}
cout << ch << "\n";
for (int i = 1; i < n; i++) {
if (k == 0) break;
if (i == n-1) break;
ch[i] = '(';
ch[i+1] = ')';
i++;
k -= 2;
}
if (k != 0) {
cout << "IMPOSSIBLE\n";
return;
}
cout << ch;
}