I'm not sure where I should put the question, it's not for school or university, but just out of curiosity.

2D space hypercubes are squares. Let's paint the sides of a square with red and blue by the special way: its blue side must be opposite its red side. We can match any two squares painted according to this rule, only rotating them without taking them out of the plane (2D space). It seems we can do similar things with 3D cubes, painting their faces by the similar rule (a blue face opposite to a red face) and then matching them without taking out from 3D space.

So, the question is: is that valid for any N-dimensional hypercubes in any N-Dimensional space?

Thanks in advance.