US supermarket retailer Giant Eagle is to purchase five former Penn Traffic stores from Tops Markets.