Python code to solve xkcd 1313 by Peter Norvig | Heykuki News