Task: Program Execution
Input (English): g A B 2283 n 2457 9187 4257 m 1595 x 8853 A 5705 T 5307 r 3135 2095 1875 671 K 5247 9321 a 4649 h N
Output (English): 7, 1, 2, 2283, 14, 2457, 9187, 4257, 13, 1595, 24, 8853, 1, 5705, 20, 5307, 18, 3135, 2095, 1875, 671, 11, 5247, 9321, 1, 4649, 8, 14