└── tower of hanoi /tower of hanoi: -------------------------------------------------------------------------------- 1 | def toh(n,f,t,ax): 2 | if n==1: 3 | print(f,t) 4 | return 5 | toh(n-1,f,ax,t) 6 | print(n,f,t) 7 | toh(n-1,ax,t,f) 8 | n=int(input()) 9 | toh(n,'R','P','S') 10 | --------------------------------------------------------------------------------