Task: Program Execution
Input (English): D, 6167, 9707, 371, R, 4627, Z, 7589, 7457, 1903, 1473
Output (English): D, R, Z