Task: Program Execution
Input (English): n, 661, Z, w, X, U
Output (English): 661