Swap The Characters by fatO

import java.util.*;enum z{z;System m;String y,f=" ";{for(Scanner s=new Scanner(m.in);(y=s.next())==y;m.out.println(y))for(String l:(s.nextLine()+f).split("")){y=y.replace(l,f);f=l;}}}

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

download

return to the top page