import java.util.*; import java.io.*; public class Main { public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); char[] str = br.readLine().toCharArray(); StringBuilder sb = new StringBuilder(str.length); boolean flag = false; for (int i = 0 , len = str.length ; i < len ; i++){ char c = str[i]; if(c == '#'){ flag = !flag; }else if(flag){ sb.append(c); } } System.out.println(sb); } }