Gunman releases hostages at US school