For this Question: Given a string S of length N. Find a string R of length N such that hamming distance between S and R is 1 and R is lexicographically smallest possible.
Note: The Hamming distance between two strings of equal length is the number of positions at which the corresponding symbols are different.Input contains a single string S containing english lowercase alphabets.

Constraints:
1 <= |S| <= 100000Print a single string R, such that R contains english lowercase letters only.Sample Input
aba

Sample Output
aaa

Explanation: hamming distance between aba and aaa = 1 and aaa is lexicographically smallest such string.

Sample Input
a

Sample Output
b, I have written this Solution Code: import java.io.*;
import java.util.*;



class Main {
	public static void main (String[] args)throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String s1 = br.readLine();
        int count=0;
		StringBuilder sb = new StringBuilder();
        boolean entered = false;
		boolean zEntered = false;
        for (int i = 0; i < s1.length(); i++) {
            if (s1.charAt(i) != 'a' && s1.charAt(i) != 'z' &&  !entered &&!zEntered) {
                sb.append('a');
                entered = true;
            }
			else if(s1.charAt(i)  == 'z' && !zEntered &&!entered)
            {
				sb.append('a');
                zEntered = true;
            }
            else
            {
                if((count+1)==s1.length())
                {
                    int c = s1.charAt(i);
                    c++;
					sb.append((char)c);
                }
                else
                {
					sb.append(s1.charAt(i));
                }
                count++;
            }
        }
        System.out.print(sb);
	}
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?