Task: Program Execution
Input (English): 2, ['E', 'G', 'X', 'G']
Output (English): E, G