Recently, because of appearance the torussians inside sql-ex.ru site, much information about Lorus Galaxy became known. It turned out that Torus 36x36 is not biggest planet of the system. In the aims of cultural exchange some facts of historic chronicles of Torus was added to common and checking site databases (Painting, Ships, etc.).
The sql-ex task situations explains that Torus unit of length is called a torometer, and united currency is torobucks. The Torus life base is water and its ice variety. Task situation contains other information on physical-chemical characteristics, economical, social and political systems of planets Torus MxN.
Now we will not be tied with our “common” databases and present the next “universal” task situation on Torus.
Neighbor states on Torus 3x7
For each state of the Torus 3x7:
T00 T01 … T06 T10 T11 … T16 T20 T21 … T26 find a list of neighbor states, which have bounds of not non-zero length. Result must be outputted in the table with five columns: [State], [NN], [WW], [SS], [EE]. Hint. This is the answer for common (non-toroidal) case: