Winners and losers from the gradual formation of trading blocs