Task: Program Execution
Input (English): 3, 5, ['Q', '2981', 'u', 'd', 'O', 'H']
Output (English): O, d, u