#include <iostream>
#include <windows.h>
using namespace std;
#define N 1000
int main()
{
char str[N];
freopen("in.txt","r+",stdin);
freopen("out.txt","w+",stdout);
int k=0;
while(k<1000)
{
cin.getline(str,1000);
wchar_t wstr[N];
MultiByteToWideChar(CP_ACP,0,str,-1,wstr,N);
unsigned short *p = (unsigned short *)wstr;
int len = wcslen(wstr);
for(int i = 0; i!=len; ++i)
cout<<"&#x"<<hex<<*p++<<';';
cout<<endl;
k++;
}
return 0;
}