Task: Program Execution
Input (English): 1007, v, 1215, 5693, 7893, m, 3843, 1647, L, t, M, 2515, m, 5561, 2955, D, t, 1623, V
Output (English): 1007, 1215, 5693, 7893, 3843, 1647, 2515, 5561, 2955, 1623