C++ Solution
\nclass Solution {\npublic:\n    string smallestString(string s) {\n        bool fl=false;\n        for(int i=0;i<s.size();i++)\n        {\n            if(s[i]!
```\nclass Solution {\npublic:\n    string smallestString(string s) {\n        bool fl=false;\n        for(int i=0;i<s.size();i++)\n        {\n            if(s[i]!=\'a\')\n            {\n                s[i]--;\n                fl=true;\n            }\n            else\n            {\n                if(i!=0 && fl==true)\n                break;\n            }\n        }\n        if(fl==false)\n        {\n            s[s.size()-1]=\'z\';\n        }\n        return s;\n\n\n    }\n};\n```
['C++']