#C9559. First Non-Repeating Character
First Non-Repeating Character
First Non-Repeating Character
Given a string s
, your task is to find the first non-repeating character in the string. A non-repeating character is one that appears exactly once in the string. If there is no such character, output an empty string.
The problem requires reading input from standard input and writing output to standard output. The solution should work efficiently for any valid input string.
Example:
- Input:
swiss
→ Output:w
- Input:
teeter
→ Output:r
- Input:
aabbcc
→ Output:
inputFormat
The input consists of a single line containing the string s
. The string can contain any visible characters.
outputFormat
Output the first non-repeating character of the string. If no such character exists, print an empty string.
## sampleswiss
w