s = input() judge = False for i in s: if s.count(i) == 1: print(i) judge = True break if not judge: print(-1)