s = input() l = s.index('#') r = s.rindex('#') print(s[l+1:r])