The pedestal upon which stood the Hypercube didn’t fit into the castle’s interiors. It was a high-tech column above which hovered the Cube in a cylinder of bluish light without any visible support. Most likely, the cylinder is a force field, which has to be turned off in order to take the Cube.
"Did Lord Escher actually die? What if he just went back to his home planet?", - the thought has involuntarily entered your mind. But there was no time for reflection. You can’t rule out the possibility of the owner’s ghost trying to stop you on your way back, so you have got to hurry.
When you took a few steps closer to the Cube and were getting ready to reach out, you suddenly felt like you’ve bumped into something invisible, yet impenetrable. Was the Hypercube surrounded by another force field?!
Well, you have to find a way to turn it off.
When you’ve touched an outer invisible force field, a rectangle consisting of letters appeared on it. While you were looking at these letters, their set had changed. It seems that every 10 seconds the letter box automatically reboots. You need to wait for the moment when you can clearly read 'Hypercube' on the field - this will be the short window during which the field is deactivated and you can pass.
Input: Array of the letters.
Output: True or False.
hypercube([ ['g', 'f', 'H', 'Y', 'v'], ['z', 'e', 'a', 'P', 'u'], ['s', 'B', 'T', 'e', 'y'], ['k', 'u', 'c', 'R', 't'], ['l', 'O', 'k', 'p', 'r']]) == True hypercube([ ['H', 'a', 't', 's', 'E'], ['a', 'Y', 'p', 'u', 'B'], ['a', 'a', 'P', 'y', 'U'], ['x', 'x', 'x', 'E', 'C'], ['z', 'z', 'z', 'z', 'R']]) == False
How it is used: For the lexicographic analisys.
3x3 <= array size <= 5x5