main=interact $ unlines.f[].map read.words f [] (x:rs)=show x:f[x]rs f _ [] = [] f ls (x:rs)=let (u,s) = break(x] then "*" else ""):f(x:ls)rs