char*p;main(c,s){while(p++?:gets(p=s))p=index(p+1,c=putchar(*p?:10))?:index(s,c);}