Task: Program Execution
Input (English): m, but, n, distance,, d, i, j, z, N
Output (English): mbutndistance,dijzN