Task: Program Execution
Input (English): 5, 9, ['A', '2629', '7039', '2743', 'J', '2913', 'C', '1685', 'Q', 'P']
Output (English): Q1685C2913J