Task: Program Execution
Input (English): R, m, 1075, N, T, 7371, I, O, q, r, 2519, A, l, 371, N, u, 5961, 4899, 3987, B, 9439
Output (English): 1075, 7371, 2519, 371, 5961, 4899, 3987, 9439