import java.util.*;


public class Solution {
    /**
     * 反转字符串
     * @param str string字符串 
     * @return string字符串
     */
    public String solve (String str) {
        // write code here
        if(str == null) {
            return null;
        } 
        char[] arr = str.toCharArray();
        int i = 0, j = arr.length - 1;
        char tmp;
        while(i < j) {
            tmp = arr[i];
            arr[i] = arr[j];
            arr[j] = tmp;
            i++;
            j--;
        }
        return new String(arr);
    }
}