Task: Program Execution
Input (English): 5, 10, ['r', '2431', '5271', '6961', '8047', 'J', '1431', '2957', 'J', 'Q', 'a']
Output (English): QJ75921341J7408