Three principals to resign; board praises quick-thinking teacher