m:-X is random(2),nth0(X,["A AA B B BB A","AAB BAAB A"],Y),writef(Y).