Question
Five persons A,B,C,D and E are seated in a circular arrangement. If each of them is given a hat of one of the three colours red, blue and green, then number of ways of distributing the hats such that the persons seated in adjacent seats get different coloured hats is