This and the next step involve the plotting of 2 sets of stars -
Bo Shi Shi Er Shen 博士十二神 and
Chang Sheng Shi Er Shen 长生十二神.
Each set consists of 12 different stars, arranged in a fixed sequence and
each star to be allotted to one of the 12 Palaces.
The first set is named
Bo Shi Shi Er Shen 博士十二神 because the first star in the set is
Bo Shi 博士.
Alternatively
Bo Shi Shi Er Shen is also called
Shi Er Gong Tai Sui Shen Sha 十二宫太岁神煞.
The Stars are as follow:
1. Bo Shi 博士 (Cleverness)
2. Li Shi 力士 (Power Monger)
3. Qing Long 青龙 (Green Dragon)
4. Xiao Hao 小耗 (Waste)
5. Jiang Jun 将军 (Pompousness)
6. Zou Shu 奏书 (Scholarly)
7. Fei Lian 飞廉 (Slander)
8. Xi Shen 喜神 (Jubilation)
9. Bing Fu 病符 (Sickness)
10. Da Hao 大耗 (Exhaust)
11. Fu Bing 伏兵 (Deception)
12. Guan Fu 官府 (Litigation)

First of all, determine whether one is Yin Male/Female or Yang Male/Female.
The Birth Year Stem determines whether one is Yin 阴 or Yang 阳.If one was born in the
Year of Jia 甲, and
Jia being Yang, he/she is a
Yang 阳 Male/Female.
Or, if one was born in the
Year of Gui 癸, and
Gui being Yin, he/she is a
Yin 阴 Male/Female.
The first star in the set, Bo Shi 博士, will be established in the palace in which Lu Cun 禄存 resides in.If one is either
Yang Female or Yin Male,
the other 11 stars in the set will be arranged in each of the other 11 palaces in an
Anti-Clockwise direction.
If one is either
Yin Female or Yang Male,
the other 11 stars will be arranged in each of the other 11 palaces in a
Clockwise direction.
Example:

The subject was born in the
Year of Jia, thus she is a
Yang Female 阳女.
As
Lu Cun 禄存 resides in
Children Palace,
Bo Shi 博士 is established in
Children Palace.
The subject is
Yang Female (Anti-Clockwise direction).
Thus,
Li Shi 力士 is established in
Wealth Palace.
Followed by the next star
Qing Long 青龙 in
Health Palace, and so on,
till the last star,
Guan Fu 官府 in
Marriage Palace.