Task: Program Execution
Input (English): 3, 5, ['F', '221', 'J', 'O', 'g', 'j']
Output (English): gOJ