UK inflation hits 40-year record, highest in G7