program fordito;
var fi:file of shortint;
    ft:text;
    t,x,y,z:shortint;
    s:string;

begin
   write('Input filename:');readln(s);
   assign(ft,s);
   write('Output filename:');readln(s);
   assign(fi,s);
   reset(ft);
   rewrite(fi);
   t:=1;
   repeat
     read(ft,x,y,z);
     write(fi,x,y,z);
     inc(t);
   until x=127;

   repeat
      read(ft,x);
      write(fi,x);
   until x=127;
   close(fi);
   close(ft);
end.
