print(z.grad_fn) # print(y.grad_fn) # print(x.grad_fn) # None ← leaves have no history