Problem:
Score : 100 points

Problem Statement

Given is a lowercase English letter C that is not z. Print the letter that follows C in alphabetical order.

Constraints

C is a lowercase English letter that is not z.

Input

Input is given from Standard Input in the following format:

C

Output

Print the letter that follows C in alphabetical order.

Sample Input 1

a

Sample Output 1

b

a is followed by b.

Sample Input 2

y

Sample Output 2

z

y is followed by z.

Solution in Java8 (OpenJDK 1.8.0) (judge verdict: Runtime Error)

import java.util.HashMap;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String[] s1 = scanner.nextLine().split(" ");
        int M = Integer.parseInt(s1[1]);
        HashMap<String, Integer> problems = new HashMap<>();
        int ac = 0;
        for (int i = 0; i < M; i++) {
            String line = scanner.nextLine();
            while (line == null || line.replaceAll(" ","").equalsIgnoreCase("")) {
                line = scanner.nextLine();
            }
            String[] s2 = line.split(" ");
            String pi = s2[0];
            String st = s2[1];
            if (problems.containsKey(pi)) {
                if (problems.get(pi) > 0) {
                    if (st.equalsIgnoreCase("AC")) {
                        ac ++;
                        problems.replace(pi, -(problems.get(pi)));
                    } else {
                        problems.replace(pi, problems.get(pi) + 1);
                    }
                }
            } else {
                if (st.equalsIgnoreCase("AC")) {
                    ac ++;
                    problems.put(pi, 0);
                } else {
                    problems.put(pi, 1);
                }
            }
        }
        int wa = 0;
        for (String string : problems.keySet()) {
            int a = problems.get(string);
            if (a > 0) {
                wa += a;
            } else {
                wa += -a;
            }
        }
        System.out.println(ac + " " + wa);
    }
}