Task: Program Execution
Input (English): Q, 3091, g, m, 2851
Output (English): Q, g, m