Task: Program Execution
Input (English): 6805, 2161, 283, 5159, D, Q, M, p, 787, 1715, 1789, 785, F, 1017
Output (English): 5, 6, 7, 8, 13