Hex was partially invented by the mathematician of what European nationality?