Task: Program Execution
Input (English): 2607, 5943, 2849, U, 5143, J, K, 3619, 6507, d, 9397, 1221, 5203, A, M, z, 7889, q, 985
Output (English): 4, 6, 7, 10, 14, 15, 16, 18