I,R,O=input,range,print J=lambda:map(int,I().split()) S=I() a=b=0 for s in S: if s=='#': if b==0:b=a else:break a+=1 O(S[b:a+1])