The corresponding relationship between the five elements and the heavenly stems:
Wood → A and B, fire → Bing and Ding, earth → Wu and Ji, metal → Geng and Xin, water → Ren and Gui.
The corresponding relationship between the Five Elements and the Earthly Branches:
Wood → Yinmao, Fire → Siwu, Earth → Chenchou Xuwei, Metal → Shenyou, Water → Haizi.