for(t=0;S=s=readline(v=i="");print(t=v))for(t+=T=t;S[n=i++]+T[n];v+=T[n]+S[i]?c+t[n]:c)s+=c=s[n]