Repeated Character


There is a string given. Find the first repeated character in it.

Write a function solve that have the following parameter(s):
1.) a = string

Example
Input:
There is string:
greed
Output:
The function will return,
e

Explanation
As e is the first repeated character in the given string.

Constraints
• The size of the string will be greater than or equal to 1 and less than or equal to 4000.