Solution
3 3 3 4 4
3 2 2 4 4
2 2 1 5 5
1 1 1 5 5