Task: Program Execution
Input (English): N, 3635, a, G, 4961, 3627, v, 5247, A, 8143, 3641
Output (English): 14, 3635, 1, 7, 4961, 3627, 22, 5247, 1, 8143, 3641