Task: Program Execution
Input (English): n, 381, j, 131, w, 365
Output (English): 1, 3, 5, 6, 8