var n,i: integer;
begin
repeat
write('Nhap so do: '); readln(n);
until n > 50;
writeln('Cac so chan: ');
for i:=0 to n-2 do
if i mod 2 = 0 then write(i,' ');
if n mod 2 = 0 then writeln(n,'.')
else writeln(n-1,'.');
writeln('Cac so le: ');
for i:=0 to n-2 do
if i mod 2 <> 0 then write(i,' ');
if n mod 2 = 0 then writeln(n-1,'.')
else writeln(n,'.');
end.