I would put the medium frames in one end, and let the bees build comb below them, and moving on into the deep frames. But with this approach, you would need to be watchful for them attaching the comb to the sides. Not a big issue most of the time if you keep it cleaned up.
If you really don't want them to build that comb under the frame, you could always build a short box to put in the bottom of the long hive, like a step. With this approach you would be raising the floor of the hive underneath the medium frames, to bee space. Put the box at one end of the hive, with all the medium frames above it. This would prevent the bees from building that extra comb underneath. Where the deep frames begin, the box ends. The bees will move into the deep frames and draw them out. At any point in the future, you could remove the medium frames and shorten the box, adding in more deep frames. Since the box is not attached to the bottom of the hive, it should be easy to slip in and out. Just a thought.