Task: Program Execution
Input (English): 5, 5, ['r', 't', 'u', '7431', '1397', 'i', 'L', 'T']
Output (English): 1397