#C12222. First Non-Repeating Character
First Non-Repeating Character
First Non-Repeating Character
You are given a string s
. Your task is to find the first character in the string that does not repeat. If every character in the string appears more than once, output No unique characters found
.
For example, given the string abcdef
, the answer is a
because it is the first character that uniqueness is maintained. Similarly, given aabbccdde
, the answer is e
since e
is the first non-repeating character. If no such character exists, you should print No unique characters found
.
The solution should read input from standard input (stdin) and output the result to standard output (stdout).
inputFormat
The input consists of a single line containing the string s
. The string may include letters (both uppercase and lowercase), digits, and special characters. The length of s
is between 0 and 10,000.
outputFormat
Output a single line: the first non-repeating character in the input string s
, or the message No unique characters found
if every character repeats.
abcdef
a