Implement string reversal for Ex 6