Students told to write thank-you letters to cafeteria staff after maggots were found in lunches