... the 'A', 'B', 'C' are examples which stand for
something, it could be anything. I could have called it 1 2 3 too...
The point is that using many replace statements after eachother and using the same input variable as the output variable is not a good programming method. You should use a different variable as output to avoid that 'A' becomes 'C' in the end.
Explained many times on the forum too though. The type of script asked here, and the scripts shown here already exist in many forms. So search forums first instead of creating yet another script which does the same thing (in a bad way).