Task: Program Execution
Input (English): 3, 3, ['k', 'w', '6547', '4701', 'r', '1829', '1621', '3691', 'a', '4915', '8283', '5109', '2031', 'L', '3713', '7445', '2047']
Output (English): 6547, 1829, a, 5109, 3713