class Solution { public: string solve(string str) { int k=str.length()-1; string m=""; while(k>=0)m+=str[k--]; return m; } };