Task: Program Execution
Input (English): N 1865 B 1519 X 4861 Y 2131 3577 V k 4131 7379 6631 t r k q e x 3573 b 1799 x 7419 w 8539 3565 5115 r x 5873 P 5403 15 4291 2793
Output (English): 14, 1865, 2, 1519, 24, 4861, 25, 2131, 3577, 22, 11, 4131, 7379, 6631, 20, 18, 11, 17, 5, 24, 3573, 2, 1799, 24, 7419, 23, 8539, 3565, 5115, 18, 24, 5873, 16, 5403, 15, 4291, 2793