Task: Program Execution
Input (English): 2, 6, ['Q', 'J', 'm', 'c', 'f', '1567', 'A', 'c', 'G', 'N', '4049', '3943', 'c']
Output (English): J, c