Task: Program Execution
Input (English): h, R, 5105, 6845, D, K, 8205, A, 6387, 6137, 7405, 3605, 1805, x, Q, 311, 8481
Output (English): 8, 18, 5105, 6845, 4, 11, 8205, 1, 6387, 6137, 7405, 3605, 1805, 24, 17, 311, 8481