#C13785. First Non-Repeated Character
First Non-Repeated Character
First Non-Repeated Character
You are given a string S
. Your task is to find the first character in S
that does not repeat anywhere else. A character is considered non-repeated if its frequency in the string is exactly one. If no such character exists, print None
.
For example, in the string "swiss", the character 'w' is the first character that appears only once. In contrast, if every character repeats, the output should be None
.
Note: The input will be provided as a single line via standard input, and the output should be written to standard output.
inputFormat
The input consists of a single line containing the string S
. The string may be empty.
outputFormat
Output the first non-repeated character in S
. If there is no such character, output None
.
swiss
w