Task: Program Execution
Input (English): k, 371, t, q, v
Output (English): 1, 3, 7