Make hexadecimal exercise compatible with Python3