in this problem you are given a board in which some of the elements are placed as shown in below diagram.each element represent a color.fill the other element in the board,such that none of the adjacent elements (vertically,horizontally&diagonally) should be of the same color.find out minimum number of color that should be used to fill the blank spaces in the board,so that the above condition is met.color representation is-:0,1,2,3,4,....
for example
input:{20_1}
{_1__}
{_2_0}
{___1}
output;
5