Task: Program Execution
Input (English): 5017 g R 5675 2333 P B a 2195 B B V 3949 8327 N 5093 U 2669 X 3541 5489 6557 t K 9007 5939 D z
Output (English): 5017, 7, 18, 5675, 2333, 16, 2, 1, 2195, 2, 2, 22, 3949, 8327, 14, 5093, 21, 2669, 24, 3541, 5489, 6557, 20, 11, 9007, 5939, 4, 26