Sorry, an error has occurred: global name 'cat' is not defined