Task: Program Execution
Input (English): n, G, 5059, 8343, 8673, P, N, 5485, 2279, 6121, i, U, 7277, 8701, A, b, Z, R, 6371, G
Output (English): 58309