Task: Program Execution
Input (English): 3, 3, ['S', '2451', 'U']
Output (English): 0