Task: Program Execution
Input (English): p, 1827, 7531, b, G, 4789, w, 8029, 7101, D, m, 4265, D, R, 5203, U
Output (English): 1827, 7531, 4789, 8029, 7101, 4265, 5203