Import Java.util.Scanner;
public class ABA {public static void main (string[] args) {Scanner sc=new Scanner (system.in);
int N=sc.nextint ();
Arraymethod (n); } public static void Arraymethod (int n) {string[] s1={"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N",
"O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"};
String[] s2={"A"};
if (n==1) PrintArray (S2);//If input 1, direct output a else{for (int i=2;i<=n;i++) {S2=method (s2,s1[i-1]);
} printArray (S2); }} public static string[] Method (string[] s,string s2) {//Returns an array of: Both sides is an array of s, the middle is S2 string[] str=new string[s.lengt
H*2+1];
for (int i=0;i<s.length;i++) {str[i]=s[i];
} str[s.length]=s2;
for (int i=0;i<s.length;i++) {str[i+s.length+1]=s[i];
} return str; } public static void PrintArray (string[] st) {//print array, one line for each 100 lines for (int i=0;i<st.length;i++) {if (i%100==0) syste
M.out.println ();
System.out.print (St[i]); }
}
}
First enter a number and then output the result. Scale (1-23)