import java.util.Scanner; public class Main { public static void log(Object obj) { System.out.println(obj.toString()); } public static void main(String[] args) { Scanner sc = new Scanner(System.in); String s = sc.next(); StringBuilder builder = new StringBuilder(); boolean flag = false; for(char c: s.toCharArray()) { if(c == '#') { flag = !flag; continue; } if(flag) { builder.append(c); } } log(builder.toString()); } }