Towers of Hanoi solution in Prolog