Var n:integer;
Begin
Repeat
Write('Nhap n = ');readln(n);
If (n > 8) or (n < 2) then write('Nhap sai, nhap lai ');
Until (n <= 8) and (n >= 2);
If n = 2 then write('Thu hai');
If n = 3 then write('Thu ba');
If n = 4 then write('Thu tu');
If n = 5 then write('Thu nam');
If n = 6 then write('Thu sau');
If n = 7 then write('Thu bay');
If n = 8 then write('Chu nhat');
Readln;
End.