S=list(input()) T=dict([(S[i],i) for i in range(len(S))]) k1=list(T.keys())[0] k2=list(T.keys())[1] if T[k1]