Task: Program Execution
Input (English): g, F, 8843, 7109, n, p, G
Output (English): 15952