Task: Program Execution
Input (English): 3, 3, ['7357', 'Z', '2747', 'R', 'R', 'Z', '4107', 'J', '4457', 'B', 'H', '8181', 'n', 'Y', 'M', 'C', '441', 'P', '3911', 'M', '5157', 'h', 'G', 'v']
Output (English): 2747, Z, 4457, 8181, M, P, 5157, v