It is show-and-tell day at Springfield Elementary School, and almost every student has brought a geode - except for Nelson Muntz, who has brought his usual empty tomato paste can. In order to stand out, Bart brings his dog, Santa's Little Helper, to school. Everyone is excited to see the hound, but Santa's Little Helper has to be locked up in a closet afterwards. It isn't long before he makes his way into the air vents, where he is shortly noticed by Ralph Wiggum. Groundskeeper Willie is covered in grease and sent into the vents and retrieves the dog, but Superintendent Chalmers shows up, furious after hearing about the dog. At first, Chalmers looks into Santa's Little Helper's eyes and forgives Skinner for what has happened. But after a falling Willie lands on the "bloated gasbag," this is the final straw. Chalmers fires Skinner on the spot, and Bart is guilty because of his dog.
Skinner is at first at a loss for what to do, and in the meantime Ned Flanders becomes the new principal. However, he is completely lax with the rules, and the entire school breaks out in chaos, with the teachers terrified of leaving the Teacher's Lounge, riots breaking out and spreading cross-class, and even with Martin Prince locked in a cage as the class pet. Meanwhile, Skinner has rejoined the army but finds that discipline in the army isn't quite the same as it was when he was a 'Nam veteran.
Despite the chaos, Bart feels bad for Skinner, and wants to try to get Flanders fired. Superintendent Chalmers shows up to do another inspection of the school, and Bart tries to convince him to fire Flanders because of the chaos the kids can make with impunity. Chalmers at first hesitates, since he considers all public schools will be headed this way, and then hears Flanders ask the students to "thank the Lord" over the intercom, which infuriates Chalmers even more than the chaos, because you're not allowed to promote a religion in public school. Ned Flanders is promptly fired and Skinner becomes principal again. Skinner and Bart know that they are no longer friends now that Skinner is principal again, so they say goodbye and walk off, feeling good about other.