~/algor $ cat problems/string-birinchi-takrorlangan-harf
First repeated letter
Easy
1000 ms
64 MB
29%
A string $s$ is given. Reading it left to right, find the first letter that has already occurred before. If there is no such letter (all letters are distinct), print NO.
Input
One line containing the string $s$.
Output
One letter or NO.
Note
$1 \le |s| \le 10^{5}$
$s$ consists of lowercase Latin letters (a–z) only
Examples
Input #1
dasturlash
Output #1
a
Input #2
olma
Output #2
NO