Before you start to clean this up you need to have 4 or 5 constructed frames prepared, each equipped with 5 or 6 rubber bands. Have a clean solid surface ready, next to the hive (you can use an upside-down top cover for this). You will use this surface for rubber-banding comb into the prepared frames.
1. smoke the bees significantly before proceeding. You need to have full garb on before proceeding.
2. remove the upper box.
3. You may need to smoke the bees AGAIN that are on the protruding comb that the bees built on top of the frames, so that most will leave before you start cutting.
4. using either a knife or hive tool, start slicing by running the blade along the top of the comb.
5. remove as large a slice of the comb as you can handle. Place the comb in one of the frames prepared with rubber bands, keeping the comb in the same orientation as it was prior to when you sliced it loose. Move 2 or 3 rubber bands to hold the comb in the prepared frame.
6. repeat steps 4 and 5; you may be able to place more than one piece of comb into the prepared frame, each time moving the rubber bands to hold the comb in place.
7. when you have finished removing the messy combs and rubber-banded them into the prepared frames, place the frames into the upper box (or a box that is the appropriate size for the frames.
8. If the number of frames with the relocated comb is not enough to fill the box, add frames either with foundationless, or with "popsickle sticks" for foundationless, and place the box back on top of the bottom box. Replace the
9. Do not allow this to happen again. I did a similar dumb thing, and also had a mess to clean up (on 2 colonies) last week. Fortunately only one of the colonies resembled the mess of your pictures. The other was not so bad. Hopefully your bees will be as tolerant as mine - only one bee started bumping my veil, when I was 90% completed with the cleanup.
Phil