On the Subject of Keypad Maze

You have to explore almost every cell in 10*10 maze. Sorry.

You're in one of 10*10 mazes discribed in table below.

First of all, you have to obtain which button (below square display) directs to which direction. To obtain that, simply look at button's color: red = up, green = right, blue = down, yellow = left.

Once obtained, you can freely move in the maze. The square display shows a random number and adjacent walls. Be careful! If you try to cross a wall, you'll get a strike.

Based on adjacent walls, figure out in which maze you are and what is your current position.

Every cell has 2 values: a position number and an input number. Find 4 yellow cells in your maze, take their values and place every input number in the position given by the position number to form a 4-digit code to submit.

Submit the received code with the keypad to the right.

Note: every maze is wrap-around.

Possible mazes:

1 2 2 4 2 4 4 2 1 1
2 2 1 4 3 3 4 2 4 2
1 1 2 3 3 1 1 1 2 3
3 1 2 3 1 4 4 4 3 1
2 3 4 3 4 4 4 3 4 1
1 2 2 3 3 4 4 4 2 4
2 1 2 2 1 2 3 3 1 2
3 3 3 1 2 3 2 1 1 2
3 4 4 1 4 3 4 3 4 1
2 4 3 1 1 4 2 3 4 1
1 2 1 3 3 3 1 2 1 4
3 2 3 2 4 1 3 1 4 2
1 4 3 2 3 3 4 2 2 2
1 4 2 4 4 2 3 1 1 1
4 4 4 4 1 3 2 1 3 4
3 1 3 2 4 3 3 1 4 4
1 3 1 1 4 1 2 3 4 4
3 3 3 3 2 4 1 2 4 3
2 1 1 3 2 1 1 2 2 3
2 1 1 2 1 4 4 4 4 3
4 1 4 4 2 1 1 1 3 3
2 3 4 1 3 4 1 3 3 2
4 3 2 1 1 3 1 2 3 1
2 4 3 3 3 2 4 2 2 4
1 2 2 4 1 4 2 4 2 1
2 1 1 3 4 1 1 1 2 1
1 1 4 2 3 4 3 1 2 4
4 3 2 3 2 4 3 4 3 3
3 4 2 2 1 1 4 1 1 4
3 3 2 3 4 2 3 4 2 4
2 3 2 2 4 1 2 1 4 4
2 2 3 3 3 1 4 1 2 3
1 3 2 3 2 3 4 2 1 4
4 4 1 1 3 1 2 1 3 1
3 3 4 4 4 4 1 4 1 3
3 4 1 2 3 3 4 2 3 3
2 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