Task: Program Execution
Input (English): R, Q, 1165, 5789, 5285, 7417, L, 3727
Output (English): R, Q, L