Can you solve the Pinocchio "green hats" logic puzzle?

Oh, duh, of course.
Many thanks to you.