Towers of Hanoi in JavaScript and Python