anarchy golf but every repeated word jumps back to its last instance by rotary-o

print("\\w+".r.replaceAllIn(""++io.Source.stdin,m=>{val a=m.before+""split"(?i:\\b"+m+"\\b)"
if(a.size<2)m+""else m+a.last+m}))

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

To protect the system from spam, please input your favorite sport (hint: I believe its name must start with 'g', case insensitive)

download

return to the top page