A picture is attached with this question. You have to fill the grid in a manner that every row and column contains the digits 1 to 6. Also, make sure that the squares that are connected with each other must contains the same digit.Can you do it?

Picture Logic puzzle

You can refer to the solution in the given picture.