print" ".join(x for x in raw_input().split()if sorted(x,key=str.lower)==list(x))