Task: Program Execution
Input (English): 2, ['G', 'S', 'q', 'G']
Output (English): G, S