Task: Program Execution
Input (English): 2, 10, ['4973', 'Q', 'U', '1365', 'r', 'O', '3559', 'g', 'a', 'P']
Output (English): P, a, g, 3559, O, r, 1365, U, Q