Task: Program Execution
Input (English): i, m, 7843, M, J, Q, 1371, 2095, 8597, 6925, 4317, 8123, 8719, 4079, g, 8775, g, 1333, 7199, G
Output (English): i, m, M, J, Q, g, g, G, 7843, 1371, 2095, 8597, 6925, 4317, 8123, 8719, 4079, 8775, 1333, 7199