In ancestral halls, memorial tablets are generally arranged according to lineage, for example, the memorial tablets of grandparents will be placed in the central position, while the memorial tablets of parents will be placed on both sides. At the same time, the placement of memorial tablets should also take into account the influence of traditional geomantic omen, for example, it should not be placed in unlucky places such as bathrooms and balconies.
Of course, each family may be different when setting up three generations of ancestral tablets. I suggest you consult your elders or professional cultural figures for more relevant information. Answer for reference, please don't be blindly superstitious.