{Jozef Sivek ml. 14.4.2004}
program matica_cisel;
const dh = 1 ;
      hha= 11 ;
      hhb= 11 ;

type pole=array[dh..hha,dh..hhb] of integer;

var m:pole;
    i:integer;
    a,b:integer;
    uroven:integer;

label skok, ende;

begin

uroven:=2*dh;
i:=1;

repeat
a:= uroven - dh;
b:= dh;
    repeat
    if ((a >= dh) and (b <= hhb))  and   ((a <= hha) and (b >= dh)) then begin
                                                m[a,b]:=i;
                                                inc(i);
                                                                         end;
    dec(a);
    inc(b);

    if a=dh-1 then goto skok;
    if (a+b-2) = (hha + hhb) then goto ende;
    until false;

skok:;
inc(uroven);
until false;

ende:;

for b:=dh to hhb do begin
    for a:=dh to hha do write(m[a,b]:4);
    writeln;writeln;
                    end;

readln;
end.
