Task: Program Execution
Input (English): 5, 5, ['r', 'd', 'Q', 'T', 'U']
Output (English): U