Ruby solution to RNA.