The input for the program is a string composed solely of English letters. Your task is to identify and output the letters that appear more than once in the string. For each letter that repeats, only the first occurrence (the one with the smallest index) should be output. If every letter in the string is unique, you should output the message NO.
A single string containing English letters.
The solution to the problem.
Example 1
Example 2