R=io.read"*a" print((R:gsub((" "):rep(50),R:sub(1,50)):gsub("K",("*"):rep(1+R:find"T"-R:find"K"%51))))