Task: Program Execution
Input (English): 3, 3, ['O', '4465', '4729', 'W', '187', 'X', 'R', '7585', '2979', 'a', '6257', 'F', '8895', 'I', 'x', 'x', '6611', '6293']
Output (English): 4729