Task: Program Execution
Input (English): N, 1973, 3815, J, a, D, z
Output (English): N, J, a, D, z