Submission for Reditt's /r/dailyprogrammer, Intermediate #180