Task: Program Execution
Input (English): n q v 1165 1287 239 7487 w f 8585 Z 7915 9481 8847 943 2475 r 3635 4077 7629 l 6323 1113 2441 c l q 191 1049
Output (English): 14, 17, 22, 1165, 1287, 239, 7487, 23, 6, 8585, 26, 7915, 9481, 8847, 943, 2475, 18, 3635, 4077, 7629, 12, 6323, 1113, 2441, 3, 12, 17, 191, 1049