include [HTML_REMOVED]
include[HTML_REMOVED]
include[HTML_REMOVED]
include[HTML_REMOVED]
using namespace std;
stack[HTML_REMOVED]a;
int b[1001];
int main()
{
string s;
int i;
cin>>s;
for(i=1;i<=100;i++)
{
if(a[i])
{
a.push(‘(‘);
}
else if(s==’)’)
{
if(!a.empty()&&a.top==’(‘)
{
cout<<a.top();
a.push(‘)’);
cout<<a.top();
}
}
else if(s==’[‘)
{
a.push(‘[‘);
}
else if(s==’]’)
{
if(!a.empty()&&a.top==’[‘)
{
cout<<a.top();
a.push(‘]’);
cout<<a.top();
}
}
}
}