import java.util.ArrayList; import java.util.Collections; import java.util.Scanner; public class Main { public static void main(String[] args) { try (Scanner scan = new Scanner(System.in)) { int n = Integer.parseInt(scan.next()); ArrayList D = new ArrayList<>(); ArrayList C = new ArrayList<>(); ArrayList H = new ArrayList<>(); ArrayList S = new ArrayList<>(); for(int i=0; i list = new ArrayList<>(); for(int i=0; i 0) System.out.print(" "); System.out.print(list.get(i)); } } } static int toNumber(char c) { int ret = 0; if(c >= '2' && c <= '9') { ret = c - '0'; } else if(c == 'A') { ret = 1; } else if(c == 'T') { ret = 10; } else if(c == 'J') { ret = 11; } else if(c == 'Q') { ret = 12; } else if(c == 'K') { ret = 13; } return ret; } static char toChar(int i) { char c = '0'; if(i >= 2 && i <= 9) { c = (char)(i + '0'); } else if(i == 1) { c = 'A'; } else if(i == 10) { c = 'T'; } else if(i == 11) { c = 'J'; } else if(i == 12) { c = 'Q'; } else if(i == 13) { c = 'K'; } return c; } }