Solution by Aubrey Quarcoo
