@@ -0,0 +1,1827 @@
+import java.util.ArrayList;%0Aimport java.util.HashMap;%0Aimport java.util.Map;%0Aimport java.util.Scanner;%0A%0A/**%0A * Auto-generated code below aims at helping you parse%0A * the standard input according to the problem statement.%0A **/%0Aclass Solution %7B%0A%0A    private final String allChars = %22ABCDEFGHIJKLMNOPQRSTUVWXYZ?%22;%0A%0A    private Map%3CCharacter, ArrayList%3CString%3E%3E ascii;%0A%0A    public Solution(int h) %7B%0A        ascii = new HashMap%3CCharacter, ArrayList%3CString%3E%3E();%0A        for (int i = 0; i %3C allChars.length(); ++i) %7B%0A            ascii.put(allChars.charAt(i), new ArrayList%3CString%3E(h));%0A        %7D%0A    %7D%0A%0A    public void addRow(int l, String row) %7B%0A        int start = 0;%0A        for (int i = 0; i %3C allChars.length(); ++i) %7B%0A            ascii.get(allChars.charAt(i)).add(row.substring(start, start + l));%0A            start = start + l;%0A        %7D%0A    %7D%0A%0A    public String toString(String str, int H) %7B%0A        StringBuilder sb = new StringBuilder();%0A        str = str.toUpperCase();%0A        for (int h = 0; h %3C H; h++) %7B%0A            for (int i = 0; i %3C str.length(); ++i) %7B%0A                ArrayList%3CString%3E l = ascii.get(str.charAt(i));%0A                if (l == null) %7B%0A                    l = ascii.get('?');%0A                %7D%0A                sb.append(l.get(h));%0A            %7D%0A            sb.append(%22%5Cn%22);%0A        %7D%0A        return sb.toString();%0A    %7D%0A%0A    public static void main(String args%5B%5D) %7B%0A        Scanner in = new Scanner(System.in);%0A        int L = in.nextInt();%0A        int H = in.nextInt();%0A        in.nextLine();%0A        String T = in.nextLine();%0A%0A        Solution s = new Solution(H);%0A%0A        for (int i = 0; i %3C H; i++) %7B%0A            String ROW = in.nextLine();%0A            System.err.println(%22i = %22 + i + %22 ROW = %22 + ROW);%0A            s.addRow(L, ROW);%0A        %7D%0A%0A        System.out.println(s.toString(T, H));%0A    %7D%0A%7D

add ascii-art