Task: Program Execution
Input (English): n, M, 1961, T, 5829, n
Output (English): n, M, T, n