Structure of two-dimensional sandpile. I. Height probabilities