#K84427. First Non-Repeating Character

    ID: 36417 Type: Default 1000ms 256MiB

First Non-Repeating Character

First Non-Repeating Character

You are given a string \(s\). Your task is to find the first character in this string that does not repeat. If every character repeats, output an underscore ("_").

More formally, find the smallest index \(i\) such that the frequency of \(s_i\) in \(s\) is 1. If no such index exists, print \(\_\).

inputFormat

The input is read from standard input and consists of a single line containing the string \(s\). The string can be empty.

outputFormat

Output to standard output a single character — the first non-repeating character from \(s\). If no such character exists, output an underscore ("_").

## sample
swiss
w