Task: Program Execution
Input (English): a, Q, m, P
Output (English): [['a', 'Q', 'm'], ['a', 'Q', 'P'], ['a', 'm', 'P'], ['Q', 'm', 'P']]