SAP interview question

Rearrange String and opposite way