s = gets.chomp l = s.index(?#) r = s.rindex(?#) puts s[l+1...r]