program bmp_bild; {stellt Bild von Windows(3.1) Paintbrush dar}
uses crt, graph;

var f : text;
    ch : char;
    s : byte;
    pxfeld : array[1..340] of byte;
    i, x, y : longint;
    gd, gm, sd : integer;
    i2 : longint;

begin
  for i:=1 to 340 do pxfeld[i]:=0;
  assign(f, 'c:\windows\farb16.bmp');
  reset(f);
  i:=0;
  clrscr;
  gd:=9; gm:=2;
  initgraph(gd, gm, 'd:\tp\bgi');
  for i:=1 to 118 do
    begin
      read(f, ch);
      if i=55 then writeln;
      if i=19 then writeln;
      if i=27 then writeln;
      if i=3 then writeln;
      if i=11 then writeln;
      if i=35 then writeln;
      if i=43 then writeln;
      if i=51 then writeln;
      write(ord(ch):3, ' ');
    end;
  writeln;
  i2:=0;
  repeat
    i:=1;
    repeat
      read(f, ch);
      pxfeld[i]:=ord(ch);
      inc(i);
    until (i=321);
    for x:=0 to 639 do
      begin                   {fuer 16 Farben div 16, bei 256 Farben jedes Pixel einzeln}
        if odd(x) then putpixel(x, 442-i2, (pxfeld[x div 2]) mod 16)
                  else putpixel(x, 442-i2, (pxfeld[x div 2]) div 16);
      end;
    inc(i2);
  until (i2=442);
  readln;
  cleardevice;
  closegraph;
  writeln(i, ' ', i2);
  readln;
  close(f);
end.