Task: Program Execution
Input (English): e, q, P, 2729, n, 6829, W
Output (English): 9558