Completed 'Reverse a string'