Task: Program Execution
Input (English): 3, 7, ['5109', '1201', '855', 'q', '6701', '4347', 'J', '2553', 'C', '5751', '8585', '8661', '389', 'P', 'H', '9637', '3937']
Output (English): 855, 5751, 3937