Sage supports free monoids and free abelian monoids in any finite number of indeterminates.
Examples of sets
Free Monoids
Enter search terms or a module, class or function name.