Task: Program Execution
Input (English): 871, x, m, n, g, C, P
Output (English): x, m, n, g, C, P