#include <iostream>
using namespace std;
string tekst,linia;
int main()
{
while (getline(cin,linia))
tekst+=linia+'\n';
for (int i=0;i<tekst.size();i++)
{
if (tekst[i]=='?' && tekst[i+1]=='?' && (tekst[i+2]=='=' || tekst[i+2]=='/' || tekst[i+2]==(char)39 ||
tekst[i+2]=='(' || tekst[i+2]==')' || tekst[i+2]=='!' ||
tekst[i+2]=='<' || tekst[i+2]=='>' || tekst[i+2]=='-'))
{ tekst[i]=0;
tekst[i+1]=0;
switch (tekst[i+2])
{
case '=':
tekst[i+2]='#';
break;
case '/':
tekst[i+2]=(char)92;
break;
case (char)39:
tekst[i+2]='^';
break;
case '(':
tekst[i+2]='[';
break;
case ')':
tekst[i+2]=']';
break;
case '!':
tekst[i+2]='|';
break;
case '<':
tekst[i+2]='{';
break;
case '>':
tekst[i+2]='}';
break;
case '-':
tekst[i+2]='~';
break;
}
}
}
cout<<tekst;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCnN0cmluZyB0ZWtzdCxsaW5pYTsKCmludCBtYWluKCkKewogICAgd2hpbGUgKGdldGxpbmUoY2luLGxpbmlhKSkKICAgICAgICB0ZWtzdCs9bGluaWErJ1xuJzsKCiAgICBmb3IgKGludCBpPTA7aTx0ZWtzdC5zaXplKCk7aSsrKQogICAgewogICAgICAgIGlmICh0ZWtzdFtpXT09Jz8nICYmIHRla3N0W2krMV09PSc/JyAmJiAodGVrc3RbaSsyXT09Jz0nIHx8IHRla3N0W2krMl09PScvJyB8fCB0ZWtzdFtpKzJdPT0oY2hhcikzOSB8fAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGVrc3RbaSsyXT09JygnIHx8IHRla3N0W2krMl09PScpJyB8fCB0ZWtzdFtpKzJdPT0nIScgfHwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRla3N0W2krMl09PSc8JyB8fCB0ZWtzdFtpKzJdPT0nPicgfHwgdGVrc3RbaSsyXT09Jy0nKSkKICAgICAgICB7ICAgdGVrc3RbaV09MDsKICAgICAgICAgICAgdGVrc3RbaSsxXT0wOwogICAgICAgICAgICBzd2l0Y2ggKHRla3N0W2krMl0pCiAgICAgICAgICAgIHsKICAgICAgICAgICAgY2FzZSAnPSc6CiAgICAgICAgICAgICAgICB0ZWtzdFtpKzJdPScjJzsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBjYXNlICcvJzoKICAgICAgICAgICAgICAgIHRla3N0W2krMl09KGNoYXIpOTI7CiAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgY2FzZSAoY2hhcikzOToKICAgICAgICAgICAgICAgIHRla3N0W2krMl09J14nOwogICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIGNhc2UgJygnOgogICAgICAgICAgICAgICAgdGVrc3RbaSsyXT0nWyc7CiAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgY2FzZSAnKSc6CiAgICAgICAgICAgICAgICB0ZWtzdFtpKzJdPSddJzsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBjYXNlICchJzoKICAgICAgICAgICAgICAgIHRla3N0W2krMl09J3wnOwogICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIGNhc2UgJzwnOgogICAgICAgICAgICAgICAgdGVrc3RbaSsyXT0neyc7CiAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgY2FzZSAnPic6CiAgICAgICAgICAgICAgICB0ZWtzdFtpKzJdPSd9JzsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBjYXNlICctJzoKICAgICAgICAgICAgICAgIHRla3N0W2krMl09J34nOwogICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICB9CiAgICBjb3V0PDx0ZWtzdDsKCiAgICByZXR1cm4gMDsKfQo=
Pz9KP0o/Sj9KP0o/Sj9ISj9UP05IPz86Pz8/OiZxdW90Oz8/OiZxdW90Oz8/e30/P3t9Pz8/e30/P3t9Pz8/ez8/e30/Pz8/Jmx0Oz8/Jmx0Oz8/Jmd0Oz8/Pyw/Pz8uPz8n
??J?J?J?J?J?J?HJ?T?NH??:???:"??:"??{}??{}???{}??{}???{??{}????<??<??>???,???.??'