High-quality grand unified theories with three generations