Map X to x y to y Teleporting

I need to teleport like this with the same x and z cords on the other side on the y axis and the same y and z cords on the other side on the x axis


|3 3|
|4 4| top veiw
|2 2|
|1 1|
|5____________5|

This cant be done in hamer with out tons of teleporting entities and that would lag for a full sdk map
Anyone?