wrote a ruby script to list out the duplicated letters in a string