For the chicory, put it in a medium saucepan and add the lemon juice, sugar, salt, peppercorns and enough water to barely cover. Place on a medium heat and cover with a circle of baking paper and a lid smaller than the diameter of the pan (this is to keep the chicory submerged). Bring to the boil, then simmer for 45–60 minutes. It is important to cook the chicory slowly to remove most of its bitterness.
Lift the chicory onto a wire rack to drain and cool. Once cool, gently press out any extra moisture with a tea towel.
Preheat the oven to 190C/170C Fan/Gas 5.
For the chard, put the butter and 100ml/3½fl oz water in a saucepan on a high heat. Cook the stalks for 20 minutes, adding more water if necessary. Once tender, lift them out and cook the leaves for 3 minutes in the same water. Strain, mix the stalks and leaves and arrange in a small gratin dish.
Meanwhile, make the cheese sauce. In a small saucepan on a medium heat, melt the butter. Add the flour, whisk until smooth and cook to a nutty blonde colour. Take the pan off the heat, whisk in the milk and return to the heat. Cook for at least 4 minutes, stirring constantly with the whisk until the sauce thickens.
Add the cheese and mustard and cook for 3 minutes, stirring, until the cheese has fully melted. Remove from the heat, taste and season if required.
To assemble the gratin, fold the ham slices in half and arrange one chicory head on each slice. Pack tightly in the gratin dish on top of the chard. Spoon over the cheese sauce and sprinkle with the remaining cheese. Bake in the top of the oven for 25 minutes until golden-brown.