fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. /* Name of the class has to be "Main" only if the class is public. */
  8. class Main
  9. {
  10. public static void main(String args[]) {
  11. int z;
  12. int n= 0;
  13. Scanner input = new Scanner(System.in);
  14. z = input.nextInt();
  15. for(int i=0;i<z;i++){
  16. n = input.nextInt();
  17. if (n % 2 == 0 )
  18. System.out.println("A");
  19. else
  20. System.out.println("B");
  21. }
  22. }
  23. }
Success #stdin #stdout 0.1s 35076KB
stdin
3
101
110
111
stdout
B
A
B