Prisoners in Hats Puzzle: two variations