using System; namespace Problem2460 { internal class Program { static void Main(string[] args) { var input = Console.ReadLine(); var firstIndex = input.IndexOf('#'); var lastIndex = input.LastIndexOf('#'); var result = input.Substring(firstIndex + 1, lastIndex - firstIndex - 1); Console.WriteLine(result); } } }