S=input() for i in range(len(S)): if S[i]=='#': l=i break for i in range(len(S)-1,-1,-1): if S[i]=='#': r=i break print(S[l+1:r])