How did the strengths and weaknesses of the North and the South contribute to the outcome of the war?