Barack Obama attacks Republicans for letting Trump 'flourish'