Task: Program Execution
Input (English): 2, ['3951', 'P', 'A', 'o', 'm', '4623', '7437', '1557']
Output (English): 3951, P