Task: Program Execution
Input (English): 2, 4, ['J', 'N', 'j', 'P', '6199', '581', 'r', '3495']
Output (English): NjP