Task: Program Execution
Input (English): 5, 5, ['r', '3229', '2791', '9829', '3121', '5445', 'i', 'J', 'S', '3225', '3245', '853', '6603', '7325', 't', '6891', 'r', '9377', 'g', '7219']
Output (English): 3121