Short C++ solution with built-in functions.
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n$$O(n)$$\n\n- Space complexity:\n$$O(1)$$\n\n# Code\n```\nclass Solution {\npublic:\n    string smallestString(string s) {\n        auto start = s.find_first_not_of("a"); // initial index where the char is different than \'a\'\n\n        if(start == string::npos)\n        {   \n            s[s.length()-1] = \'z\'; // if all "a"s, modify the last one\n            return s; // no change needed as all the chars are "a"s\n        }\n            \n        \n        for(int i=start; i<s.length(); i++)\n        {\n            if(s[i] != \'a\')\n                s[i] -= 1;\n            else\n                break;\n        }\n        return s;\n    }\n};\n```
['C++']