Task: Program Execution
Input (English): 3, 1, Q, 6
Output (English): [['3', '1', 'Q'], ['3', '1', '6'], ['3', 'Q', '6'], ['1', 'Q', '6']]