var
f: Text;
i: integer;
c: char;
begin
Assign(f, 'in.txt');
Reset(f);
while not (EOF(f)) do
begin
read(f, c);
writeln(c, ' ', ord(c));
end;
writeln('===================');
reset(f);
while not (EOF(f)) do //Второй способ, перебором получить код
begin
i := 0;
read(f, c);
repeat
i := i + 1;
until (chr(i) = c);
writeln(c, ' ', i);
end;
end.