Given a string, your task is to replace each of its characters by the next one in the English alphabet; i.e. replace a with b, replace b with c, etc (z would be replaced by a).

Example

For inputString = "crazy", the output should be solution(inputString) = "dsbaz".

Input/Output

풀이

String solution(String inputString) {
    String result = "";
    
    for (int i = 0; i < inputString.length(); i ++) {
        char c = inputString.charAt(i);
        
        if (c == 'z') result += 'a';
        else result += (char) (c + 1);
    }
    
    return result;
}