Well, they're not words- they're: BrG BrP BP BG
I want the output to print them in every possible order, like:
BrG BrP BP BG
BrP BrG BG BP
BG BrG BP BrP
etc..
So the order of the letters never changes, but the order of the words does.
I would give a code snippet, but it's not even close to the right thing I should be doing. Please help.

1 comment
Why do you need them ordered like that? Please give us the code as well.