I have a following question - till now unsolved

What is the way to do following mod - when text is typing you do this in order:
"2" - a b c 2 ...
"3" - d e f 3 ...
etc...

Is it possible to change this order of letters, delete some of them and add another?