Complete rewrite of the first Ruby-Latin, being clever, rather than using Brute Force (which didn't work)