S = input() u = "#" i = 0 while S[i] != u: i += 1 j = len(S) - 1 while S[j] != u: j -= 1 print(S[i + 1:j])