Prepare a béchamel sauce: In a small saucepan over medium heat, melt 20 grams of butter. When the butter starts to bubble, add 30 grams flour and whisk for 1 minute.
Slowly whisk in milk until smooth. Bring to a boil and cook until thick. Season with pepper, salt and nutmeg. Set aside
Spread two slices of sourdough bread with the béchamel sauce. Lay two slices of boiled ham on top and continue to top each with a slice of cheese. Finally, top each with another slice of bread.
Brush the sandwiches on both sides with the melted butter. Heat a saucepan on medium high heat, place sandwiches cheese side down.
Rest a heavy object with the flat bottom on top and cook until the bottoms of the sandwiches are browned. Flip the sandwiches, and the cook them on the other side the same way, until they're also browned.
Remove the pot and sprinkle the grated cheese over the top of the sandwiches. Transfer the sandwich to the oven and bake until heated through and cheese is melting. Serve hot!