solved 33 in ruby