Ruby Solution to PuzzleNode #12