Wash the potatoes and cook for about 20 minutes. Drain and cut in half lengthwise. Sprinkle 8 potato halves with the cheese. Pluck the thyme leaves from the stems and sprinkle over them. Cut mozzarella into 8 slices.
Cover remaining potato halves with ham, mozzarella slices and basil. Wash, clean and slice the tomatoes. Put them on the fat pan of the oven. Put potatoes on top and bake for 5-8 minutes. Garnish with basil and sprinkle with pepper