program x_3;
var
x1: array[1..8,1..5] of integer = ((4,-1,1,0,0), (3,-2,3,0,0), (2,-2,5,2,2), (2,-2,5,4,4), (1,-2,7,3,6), (1,-2,7,5,5), (0,-2,9,4,4), (0,-3,9,0,0));
x3,x4,x5,x6, x7,x8,x9,x10,x11,x12: char;
x99: qword;
x100: array[0..7] of char absolute x99;
procedure procx1;
begin
x3 := chr((ord(x100[0]) shr 1)-(ord(x100[0]) shr 5 ));
x4 := chr((ord(x100[1]) shr 1)+(ord(x100[1]) shr 3));
x5 := chr(ord(x100[2])+(ord(x100[2]) shr 1)-(ord(x100[2]) shr 4)-(ord(x100[2]) shr 6));
x6 := chr(ord(x100[3])+(ord(x100[3]) shr 2)+(ord(x100[3]) shr 3)-(ord(x100[3]) shr 5));
x7 := chr(ord(x100[4])+(ord(x100[4]) shr 3));
x8 := chr(ord(x100[5])+(ord(x100[5]) shr 3)-(ord(x100[5]) shr 6));
x9 := chr(ord(x100[6])+(ord(x100[6]) shr 2)+(ord(x100[6]) shr 3)-(ord(x100[6]) shr 6));
x10 := chr(ord(x100[7])+(ord(x100[7]) shr 2)+(ord(x100[7]) shr 3)+(ord(x100[7]) shr 6));
x11 := succ(succ(succ(succ((x3)))));
x12 := chr(1 shl 5);
end;
procedure procx2;
var
x13: integer;
begin
for x13 := 1 to 8 do
case x1[x13,2] of -1: x1[x13,2]:= ord(x3);-3: x1[x13,2] := ord(x7);otherwise x1[x13,2] := ord(x11); end;
end;
procedure procx3;
var
x14: string;
x2: integer;
begin
for x2 := 1 to 8 do
begin
x14 := stringofchar(x12,x1[x2,1]);
x14 := x14 + stringofchar(chr(x1[x2,2]),x1[x2,3]);
if (x1[x2,4]>0) then x14[x1[x2,4]+x1[x2,1]]:=x6;
if (x1[x2,5]>0) then x14[x1[x2,5]+x1[x2,1]]:=x6;
if not (x2 in [1,8]) then
begin
x14[x1[x2,1]+1] := x4;
x14[x1[x2,1]+x1[x2,3]] := x5;
end
else
if (x2>1) then
begin
x14[4]:=x8;
x14[5]:=x10;
x14[6]:=x9;
end;
writeln(x14);
end;
end;
begin
x99:={$IFDEF ENDIAN_LITTLE}$4545525453414d58{$else}$584D415354524545{$endif};
procx1;
procx2;
procx3;
end.