Task: Program Execution
Input (English): N, B, 5295, 5041, 8961, 6903, 5251, 9369, R, Q, 5211
Output (English): N, B, R, Q, 5295, 5041, 8961, 6903, 5251, 9369, 5211