!0
program self3;
var 
 a:array[1..10000] of char; i:word;
function  M(k:byte):boolean; 
 begin M:=(a[i]=chr(33)) and (a[i+1]=chr(ord('0')+k)) end;
procedure P(b:byte); begin a[i]:=chr(b); inc(i) end;
procedure G(k:byte); begin repeat dec(i) until M(k) end;
procedure C; begin write(a[i]); inc(i) end;
procedure W; 
 begin 
  write(' P(',ord(a[i]):3,');'); inc(i);
  if (i mod 10) = 0 then writeln;
 end;
begin
 i:=0;
!1
 G(0);
 inc(i); inc(i);
 repeat C until M(1);
 G(0);
 repeat W until M(2);
 W; W;
 G(1);
 inc(i); inc(i);
 repeat C until M(2);
 { Do something else here }
end.
!2
