Task: Program Execution
Input (English): 4, 3, ['2989', '945', '9585', 'Q', '6851', 'N', 'M', '119', '7271', '983', 'S', 'n', '2603', 'x', '7153', 'E', '2951', 'k', 'q', '4477', '1119', 'f', 'z', '8343', '5307', '5161', '5831']
Output (English): Q, M, 983, 2603, E, q, f, 5307