#C10030. First Unique Character Finder
First Unique Character Finder
First Unique Character Finder
Given a string s, your task is to find the first character that appears exactly once in the string. If no such character exists, output the underscore character '_'.
You need to process the string in a single pass (after counting the frequency of every character) to identify the first unique character. Formally, if we define \( f(c) \) as the number of occurrences of character \( c \) in \( s \), find the smallest index \( i \) such that \( f(s_i)=1 \). If no such \( i \) exists, output \( '_' \).
inputFormat
The input consists of a single line containing the string s (which may include any printable characters).
outputFormat
Output a single character — the first unique character in s. If there is no unique character, output '_'.
## sampleaabbcdde
c