let f=stdin.ReadLine let w(x:string)=stdout.WriteLine x let T=f() let t=T.IndexOf 'T' w(T) let mutable i=f() while i.IndexOf 'K'<0 do w(T);i<-f() let k=i.IndexOf 'K' w(i.[..k]+String.replicate(t-k)"K")