Complex sentence: All undergraduate students are required to stay in the hostel, only permanent local residents are exempted.
Split into simpler sentences: All undergraduate students are required to stay in the hostel. Only permanent local residents are exempted.