S = input() A = S.find("#") B = S.rfind("#") print(S[A+1:B])