Task: Program Execution
Input (English): 4165, 3977, 6281, Z, A, m, g, 3041, A
Output (English): Z, A, m, g, A