Task: Program Execution
Input (English): 6, 10, ['L', 'P', '8673', 't', '271', 'S', '5109', '9591', 'P', 'X', '6349', 'x', '1883', '3629', 'p', 'B', '7557']
Output (English): X, P, 9591, 5109, S