Generate package hierarchy.