Task: Program Execution
Input (English): 2161, A, i, 5277, 9595, 8227, 1087, i, M, i
Output (English): 1, 4, 5, 6, 7