Task: Program Execution
Input (English): 5981, 6207, 2409, 7895, 4479, 8401, 9161, X, S, 4983, 217, P
Output (English): X, S, P