Task: Program Execution
Input (English): 9665, X, 5447, M, j, 1367, N, A, g, x, h, B, 1767, i, n, w
Output (English): X, M, j, N, A, g, x, h, B, i, n, w