Task: Program Execution
Input (English): 5171, 5465, 3175, P
Output (English): 5171, 5465, 3175