s=0 System.in.eachLine{l=it.grep{1} s?l.eachWithIndex{v,i->v>' '?v>'+'?--s[i]:++s[i]:0}:(s=l)} print s.join()