Advent of Code 2017-09

Mark Damon Hughes

Input:

Output: