program fjf160;

var
  a:file of char;
  b,c:char;
  foo:boolean;

begin
  rewrite(a,'test.dat');
  write(a,'X','Y');
  close(a);
  reset(a,'test.dat');
  foo:=eof(a);
  write(a,'O','K');
  reset(a);
  read(a,b,c);
  close(a);
  writeln(b,c);
end.
