Task: Program Execution
Input (English): 5721, W, n, 5061, 5815, m, d, Y, 31, 1001, q, 3551, d, q
Output (English): 5721, 5061, 5815, 31, 1001, 3551