Skip to main content

~/algor $ cat contests/round-5/E

E. First repeated letter

Problem E ICPC rules 1000 ms 64 MB

A string 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.

The letters of the string: the first letter met a second time is joined by an arc to its earlier occurrence

Input

One line containing the string .

Output

One letter or NO.

Note


consists of lowercase Latin letters (a–z) only

Examples

Input #1
dasturlash
Output #1
a
Input #2
olma
Output #2
NO

Sign in to submit a solution

Signing up is free and takes a minute.