t student apply ZPP class Summer Irrelevant School the organize committee school enroll number t student enrol the enrol student divide group manner possible group emptyduring shift student ZPP grade tutor n teacher due nature educational process teacher assign exactly group possible teacher assign group the ith teacher willing work group long group li ri student bore hard besides pair teacher do not like work group total m pair conflict teachersyou head teacher Summer Irrelevant School get difficult task determine student enroll group group teacher teach