Task: Program Execution
Input (English): 291, 135, 331, m, 45, n, 271, q, w, r
Output (English): 1, 2, 3, 4, 5, 7, 9