Task: Program Execution
Input (English): A, K, d, B
Output (English): [['A', 'K', 'd'], ['A', 'K', 'B'], ['A', 'd', 'B'], ['K', 'd', 'B']]