while 1: z=list(raw_input()) for d in range(99): x=z[:d]+z[d+1:] if x==sorted(x):print z[d]