Var
A,B:integer;
C,H:Char;
Begin
For B:= 1 to 15 do
Begin
For A:= 1 to 15 do
Begin
Case (A*B) mod 16 of
0:H:='0';
1..9:H:=Chr(((A*B)mod 16)+48);
10:H:='A';
11:H:='B';
12:H:='C';
13:H:='D';
14:H:='E';
15:H:='F';
End;
Case (A*B)div 16 of
0:C:='0';
1..9:C:=Chr(((A*B)div 16)+48);
10:C:='A';
11:C:='B';
12:C:='C';
13:C:='D';
14:C:='E';
15:C:='F';
End;
Write(C+H,' ')
End;
WriteLn
End
End.