S = list(input()) n = len(S) cnt = 0 ANS = [] for i in range(n): if S[i] == '#': cnt += 1 if cnt == 2: break else: if cnt == 1: ANS.append(S[i]) print(''.join(ANS))