Task: Program Execution
Input (English): 7, 10, ['u', '3991', '1931', 'J', '7281', '3359', '581', 'W', 'D', 'p']
Output (English): p, D, W, 581