#B2110. First Unique Character Finder

    ID: 11192 Type: Default 1000ms 256MiB

First Unique Character Finder

First Unique Character Finder

Given a string that consists only of lowercase letters, find the first character that appears exactly once. If no such character exists, output no.

You are given a string s of lowercase English letters. The goal is to identify the first character in s whose frequency is exactly one. If every character in the string appears more than once, print no.

Formally, let \( s = s_1 s_2 \ldots s_n \). Find the smallest index \( i \) such that \( \text{count}(s_i) = 1 \). If no such index exists, output no.

inputFormat

The input consists of a single line containing a string s (1 \( \leq \) |s| \( \leq 10^5 \)) made up of lowercase English letters only.

For example:

aabcbc

outputFormat

Output a single line containing the first unique character in the string. If no such character exists, output no.

For example:

b

sample

abaccdeff
b