#include<iostream>
#include<string>
using namespace std;
int main()
{
string s;
while(getline(cin,s) && s != "#")
{
char c;
for(int i = 0; i < s.length(); i++)
{
c = s[i];
switch(c)
{
case ' ':
cout<<"%20";
break;
case '!':
cout<<"%21";
break;
case '$':
cout<<"%24";
break;
case '%':
cout<<"%25";
break;
case '(':
cout<<"%28";
break;
case ')':
cout<<"%29";
break;
case '*':
cout<<"%2a";
break;
default:
cout<<c;
break;
}
}
cout<<endl;
}
return 0;
}
#include<string>
using namespace std;
int main()
{
string s;
while(getline(cin,s) && s != "#")
{
char c;
for(int i = 0; i < s.length(); i++)
{
c = s[i];
switch(c)
{
case ' ':
cout<<"%20";
break;
case '!':
cout<<"%21";
break;
case '$':
cout<<"%24";
break;
case '%':
cout<<"%25";
break;
case '(':
cout<<"%28";
break;
case ')':
cout<<"%29";
break;
case '*':
cout<<"%2a";
break;
default:
cout<<c;
break;
}
}
cout<<endl;
}
return 0;
}