Task: Program Execution
Input (English): N, 7267, X, r, X, s, W, A, B, Z, 9431, g, 3709, 1453, W
Output (English): 7267, 9431, 3709, 1453