Task: Program Execution
Input (English): 6, 6, ['S', 't', 'r', '7623', '2305', '5349', 'w']
Output (English): 5349