Traditional Culture Encyclopedia - Almanac inquiry - What is the arrangement rule of heavenly stems and earthly branches?

What is the arrangement rule of heavenly stems and earthly branches?

Tiangan: A 4, B 5, C 6, D 7, E 8, Ji 9, Geng 10, Xin 1, Ren 2, Gui 3.

Gezhi: Zi 4, Ugly 5, Yin 6, Mao 7, Chen 8, Si 9, Wu 10, Wei 1, Shen 12, You1,Xu 2, Hai 3.

Calendars use heavenly stems and earthly branches to arrange year numbers and dates. There are ten words in Tiangan, so it is also called "Ten Tiangan". The order of arrangement is: A, B, C, D, E, Ji, G, Xin, Man and Ghost; There are twelve characters in the earthly branch, which are arranged in the following order: Zi, Ugly, Yin, Mao, Chen, Si, Wu, Wei, Shen, You, Xu and Hai. Among them, A, C, E, G and N are yang dryness, while B, D, J, Xin and Gui are yin dryness. Zi, Yin, Chen, Wu, Shen and Xu are the Yang branches, while Ugliness, Mao, Si, Wei, You and Hai are the Yin branches.