basic thue interpreter written in python