var st,sta:string;
n,i:longint;
begin
readln(st);
while st<>'!' do
begin
n:=length(st);sta:='';
for i:=1 to n do
begin
if st[i] in ['a'..'z'] then
sta:=sta+chr(219-ord(st[i]))
else
if st[i] in ['A'..'Z'] then
sta:=sta+chr(155-ord(st[i]))
else
sta:=sta+st[i];
end;
writeln(sta);
readln(st);
end;
end.
/**************************************************************
Problem: 2184
User: admin
Language: Pascal
Result: Wrong Answer
****************************************************************/