#C4961. First Non-Repeated Character
First Non-Repeated Character
First Non-Repeated Character
Given a string, find the first character that does not repeat in it. If every character repeats or if the string is empty, output (\texttt{None}).
Input: A single line containing the string.
Output: A single character — the first non-repeated character in the string — or (\texttt{None}) if no such character exists.
For example, if the input is swiss
, the output should be w
.
inputFormat
The input consists of a single line containing the string to be analyzed. The string can include any visible characters. Note that the string may be empty.
outputFormat
Output the first non-repeated character found in the string. If there is no such character, output (\texttt{None}).## sample
swiss
w