First of all, leave the beans to soak for at least 10-12 hours, then drain them, rinse them, put them in a saucepan, add some thyme, cover with plenty of water and cook with the lid on, over low heat, for about 2 hours.
If necessary, add hot water and, as the surface froths, remove it with a skimmer.
Halfway through cooking, add the potatoes (peeled, washed and cut into very thin slices or into small cubes).
The beans will be ready when they begin to melt, so much so that they have the consistency of a coarse purée: at this point season with salt, pepper and oil.
In the meantime, wash the chicory well under running water, remove the most damaged leaves and hard stems, then blanch them for a few minutes in lightly salted boiling water, then drain and sauté them in a pan with garlic, oil and chilli.