Task: Program Execution
Input (English): 8317, 6681, 2481, n, 1903, F, B, m, 1045, 8055, n, 8959, 959, 8107, F, 1799, P, N, 1945
Output (English): 8317, 6681, 2481, 1903, 1045, 8055, 8959, 959, 8107, 1799, 1945