Task: Program Execution
Input (English): 1373, m, r, 8747, N, Q, 3177, 1463, k
Output (English): 1, 4, 7, 8