Task: Program Execution
Input (English): g, 3023, 1661, Q, 4667
Output (English): g, Q