Task: Program Execution
Input (English): n, D, V, 1267, X, 6015, I, X, H, 4103, i, 4649, g, 8941, 6435, 4855
Output (English): 1267, 6015, 4103, 4649, 8941, 6435, 4855