Task: Program Execution
Input (English): G, q
Output (English): -1