Task: Program Execution
Input (English): n, g, 971, V, 8273, 7167, 1267, J, 8193, 6583, 6721, E, 2151, 3901, 3477, 9971, 8487
Output (English): n, g, V, J, E