Preheat oven to 400 degrees F.
Butter 1 side of each bread slice.
Set half of the slices of bread buttered side down in the griddle or cast iron skillet, and cover each with a slice of cheese. Place 3 or 4 slices of the ham over the cheese, and place the top slice of bread over the ham, buttered side up.
Heat griddle or skillet over medium heat. Cook sandwiches until bottom is golden brown and cheese is melted, about 3 minutes per side. Remove sandwiches and place on a plate.
Spread a thin layer of mayonnaise on the top of each sandwich, and then place a slice of cheese on top. Put the sandwiches back onto the griddle or skillet then place in oven, cooking until golden brown and cheese is melted, about 5 minutes.
Melt 1 tablespoon butter in skillet over high heat. Cook each egg sunny side up. Turn egg over and cook 3 minutes longer for a soft-cooked egg, or 5 minutes longer for a hard-cooked egg. Repeat with remaining butter and eggs.
Place 1 fried egg atop each sandwich. Season egg, to taste, with salt and pepper. Serve sandwich immediately.