for s in open(0):print(max(s.count(c)%2*c for c in s))