Task: Program Execution
Input (English): 2, 3, ['g', 'P', '1827', '5901', '6879', '3919', '7591', 'P', '6065', '9881', '4709', 'J', '6857', '7927']
Output (English): P, 6879, P, 4709, 7927