def first_recurring_char(s): array = [] z = str if type(s) is str and s is not None: for i in s: array.append(i) k = + 1 for j in array[0:k - 1]: if j == i: p = +1 print(p) if p > 1: z = str(j) return z print(first_recurring_char("вадвава"))