Task: Program Execution
Input (English): 2, ['5819', '7015', 'P', '7843']
Output (English): 5819, P