The structure of groups whose subgroups are permutable-by-finite