Task: Program Execution
Input (English): 10, 12, ['7847', 'f', 'T', 'Y', '3337', '6669', '1505', '9385', 'Q', '1059', 'B', '5965', 'F']
Output (English): 7024