countdown(1) :- write(1).
countdown(N) :-
write(N),
M is N - 1,
write(M).