lista = ["A","B","C","D"] for i in lista: for j in lista: for k in lista: for l in lista: print(i,j,k,l)