MathDB
Maria has a $6 \times 5$ board with some shaded squares

Source: May Olympiad 2020 L1 P4

March 14, 2021
combinatorics

Problem Statement

Maria has a 6×56 \times 5 board with some shaded squares, as in the figure. She writes, in some order, the digits 1,2,3,41, 2, 3, 4 and 55 in the first row and then completes the board as follows: look at the number written in the shaded box and write the number that occupies the position indicated by the box shaded as the last number in the next row, and repeat the other numbers in the first four squares, following the same order as in the previous row. For example, if you wrote 2,3,4,1,52, 3, 4, 1, 5 in the first row, then since 44 is in the shaded box, the number that occupies the fourth place (1)(1) is written in the last box of the second row and completes it with the remaining numbers in the order in which. They were. She remains: 2,3,4,5,12, 3, 4, 5, 1. Then, to complete the third row, as in the shaded box is 33, the number located in the third place (4)(4) writes it in the last box and gets 2,3,5,1,42, 3, 5, 1, 4. Following in the same way, he gets the board of the figure. Show a way to locate the numbers in the first row to get the numbers 2,4,5,1,32, 4, 5, 1, 3 in the last row.