#include <iostream>
#include <cstring>
using namespace std;
char array[21];
void func(int i,char *temp)
{
char retemp[21];
strcpy(retemp,temp);
if(i==strlen(array))
{
cout<<"("<<temp<<")";
return ;
}
else
{
func(i+1,retemp);
strncat(retemp,(array+i),1);
func(i+1,retemp);
}
}
int main()
{
int n;
char temp[21]={0};
cin>>n>>array;
func(0,temp);
return 0;
}
#include <cstring>
using namespace std;
char array[21];
void func(int i,char *temp)
{
char retemp[21];
strcpy(retemp,temp);
if(i==strlen(array))
{
cout<<"("<<temp<<")";
return ;
}
else
{
func(i+1,retemp);
strncat(retemp,(array+i),1);
func(i+1,retemp);
}
}
int main()
{
int n;
char temp[21]={0};
cin>>n>>array;
func(0,temp);
return 0;
}