I am (1). My index is (0, 0)
I have no top element
Right element is (2) with index (0, 1)
Bottom element is (6) with index (1, 0)
I have no Left element
--------------------
I am (2). My index is (0, 1)
I have no top element
Right element is (3) with index (0, 2)
Bottom element is (7) with index (1, 1)
Left element is (1) with index (0, 0)
--------------------
I am (3). My index is (0, 2)
I have no top element
Right element is (4) with index (0, 3)
Bottom element is (8) with index (1, 2)
Left element is (2) with index (0, 1)
--------------------
I am (4). My index is (0, 3)
I have no top element
Right element is (5) with index (0, 4)
Bottom element is (9) with index (1, 3)
Left element is (3) with index (0, 2)
--------------------
I am (5). My index is (0, 4)
I have no top element
I have no right element
Bottom element is (10) with index (1, 4)
Left element is (4) with index (0, 3)
--------------------
I am (6). My index is (1, 0)
Top element is (1) with index (0, 0)
Right element is (7) with index (1, 1)
Bottom element is (11) with index (2, 0)
I have no Left element
--------------------
I am (7). My index is (1, 1)
Top element is (2) with index (0, 1)
Right element is (8) with index (1, 2)
Bottom element is (12) with index (2, 1)
Left element is (6) with index (1, 0)
--------------------
I am (8). My index is (1, 2)
Top element is (3) with index (0, 2)
Right element is (9) with index (1, 3)
Bottom element is (13) with index (2, 2)
Left element is (7) with index (1, 1)
--------------------
I am (9). My index is (1, 3)
Top element is (4) with index (0, 3)
Right element is (10) with index (1, 4)
Bottom element is (14) with index (2, 3)
Left element is (8) with index (1, 2)
--------------------
I am (10). My index is (1, 4)
Top element is (5) with index (0, 4)
I have no right element
Bottom element is (15) with index (2, 4)
Left element is (9) with index (1, 3)
--------------------
I am (11). My index is (2, 0)
Top element is (6) with index (1, 0)
Right element is (12) with index (2, 1)
Bottom element is (16) with index (3, 0)
I have no Left element
--------------------
I am (12). My index is (2, 1)
Top element is (7) with index (1, 1)
Right element is (13) with index (2, 2)
Bottom element is (17) with index (3, 1)
Left element is (11) with index (2, 0)
--------------------
I am (13). My index is (2, 2)
Top element is (8) with index (1, 2)
Right element is (14) with index (2, 3)
Bottom element is (18) with index (3, 2)
Left element is (12) with index (2, 1)
--------------------
I am (14). My index is (2, 3)
Top element is (9) with index (1, 3)
Right element is (15) with index (2, 4)
Bottom element is (19) with index (3, 3)
Left element is (13) with index (2, 2)
--------------------
I am (15). My index is (2, 4)
Top element is (10) with index (1, 4)
I have no right element
Bottom element is (20) with index (3, 4)
Left element is (14) with index (2, 3)
--------------------
I am (16). My index is (3, 0)
Top element is (11) with index (2, 0)
Right element is (17) with index (3, 1)
I have no bottom element
I have no Left element
--------------------
I am (17). My index is (3, 1)
Top element is (12) with index (2, 1)
Right element is (18) with index (3, 2)
I have no bottom element
Left element is (16) with index (3, 0)
--------------------
I am (18). My index is (3, 2)
Top element is (13) with index (2, 2)
Right element is (19) with index (3, 3)
I have no bottom element
Left element is (17) with index (3, 1)
--------------------
I am (19). My index is (3, 3)
Top element is (14) with index (2, 3)
Right element is (20) with index (3, 4)
I have no bottom element
Left element is (18) with index (3, 2)
--------------------
I am (20). My index is (3, 4)
Top element is (15) with index (2, 4)
I have no right element
I have no bottom element
Left element is (19) with index (3, 3)
--------------------