Here is a good hint, and I do not think you should be given more.
It is this type of puzzle:
This is not yours, I just found a similar puzzle pic on line. But I would tackle the problem with a grid like this one.
I have not done it, I am just assuming that this would be the right approach.
You put a cross in all the ones that do not work and a tick in the ones that do work until you have averything filled in.
You start by putting a tick in the red house box, which means that you can cross all the other colour houses. etc.
Your teacher probably already told you this much anyway.
I am not sure that it is right but this is my logic.
It is a circle and rotations are considered the same.
In order to deal with this I have fixed on number in place.
I do not think it makes any difference which initial number you use so the chance of getting this first place right is 1.
Say that first place was filled with an A number. Then the position of the other two As is already fixed. there are 2!=2 ways the other A's can be placed.
There are three fixed places for the Bs so that is 3! ways and the same for the C's.
so that is where I got 2!3!3! from