Challenge from www.reddit.com/r/dailyprogrammer