total=0for a in range(1,5): for b in range(1,5): for c in range(1,5): if a!=b and a!=c and b!=c: total = total + 1 print(a, b, c)print(total)