x,k;main(c){for(;~(c=getchar());)putchar(c|=c&4?x=0:++x%51?k|=c&1:!(k=0));}