What was the only foreseeable way to end the war with Japan?