A train derailed near a resort town in southern Germany, killing at least three people, according to authorities.