The European Union has pledged to lend Ukraine up to 35 billion euro (£29 billion) as part of a loan package organised by the Group of Seven major industrial nations, as it seeks to help the country repair and reconnect its war-shattered power grid.