process the middle element and reverse the string