c=0 for i in range(0,4): for j in range(i+1): print(c,end=" ") c=c+1 print()