Uses  Crt;

Var A: Char;

Begin
 Repeat
  A:= Readkey;
  WriteLn(A);
  WriteLn(Ord(A));
 Until A=#27;
End.
