I Need Help



I Need Some Algorithm To finding all possible combinations of M
different symbols
like A B C

A A B B C C
B C A C A B
C B C A B A

.