Task: Program Execution
Input (English): 5, 6, ['1901', 'g', 'i', '3861', 'U', 'J']
Output (English): U, J