Members of a parliament participate in various committees. Each committee consists of at least 2 people, and it is known that every two committees have at least one member in common. Prove that it is possible to give each member a colored hat (hats are available in black, white or red) so that every committee contains at least two members with different hat colors.