Solution of White and Black Hat Puzzle

Here is the puzzle of Black and White Hats Solution, a really addictive logic problem that will require all your efforts!