Solve works!

Fixed the solve so it works. turns out the dictionary was seeing newline
characters and adding them to the dictionary as part of the word. added
a strip and it worked!