This runs for an obscenely long time. I left it on while at work. It does
come up with the correct answer, but it needs some serious optimization.
Talk about a greedy algorithm...