LearnPy Hub
← Arena
IntermediateRating 1100

First Repeated Character

Scan the string from left to right and print the first character that has already been seen. Print NONE if no character repeats.

Input

One word.

Output

One character or NONE.

Sample 1

Input
abcdcba
Output
c

Sample 2

Input
abc
Output
NONE
solution.py
Output appears here
First Repeated Character · Python Arena problem · LearnPy Hub