Ham and Potato Gratin

3 c. heavy cream
3 sprigs fresh thyme
1 bay leaf
1 shallot, chopped
6 garlic cloves, pressed
Salt and pepper, to taste
2½ lb. russet potatoes, cut into ⅛-inch thick slices
1 (16 oz.) pkg. diced ham
1 c. grated Parmesan cheese, divided
1 c. shredded cheddar cheese, divided

Preheat the oven to 375°. Meanwhile, in a medium saucepan, heat up the cream with the thyme, bay leaf, chopped shallot, pressed garlic, salt, and pepper, stirring occasionally. When the mixture is heated, remove and discard the thyme and bay leaf and set the cream aside.
In a large bowl, combine the potatoes, cream mixture, diced ham, and ½ cup of each of the cheeses. Mix until all of the ingredients are thoroughly combined and then divide the potato mixture evenly between four gratin dishes, dividing any remaining cream mixture between the dishes. Set the gratin dishes on a cookie sheet and cover each one with aluminum foil; bake in the preheated oven for 45 minutes, or until the potatoes are tender. Remove the foil from the gratins and sprinkle with some more of the remaining cheeses; broil until the cheese is golden brown and bubbly.