How did imperialism affect the relationships among the countries?