Question: Help in code usinf lists

I have two lists viz. X:=[a,b,c,d,e,f,g,h,i] of size 9. And I:=[1,2,3]. I want to generate a list of all the possible patterns of size 9 which can be made using 1,2,3. For example a few patterens which the code is to produce, among many others, are as follows: [1,1,1,2,2,2,3,3,3] [1,2,2,1,2,2,1,2,2] [2,3,3,2,3,3,2,3,3] [2,2,2,2,3,3,3,3,3] etc. Your help would be a great great help to me. I need it direly.
Please Wait...