(set'h(make-hash-table :test'equal))(defun f(x y z)(or #1=(gethash`(,x,y,z)h)(setf #1#(if(> x y)(f(f(- x 5)y z)(f(- y 5)z x)(f(- z 5)x y))z))))(loop(format t"~A "(f #2=(read)#2##2#)))