Completion settings:
Axiom: aa=1.
Defines rule #2.
Axiom: bbbbb=bab.
Flip LHS and RHS.
Defines rule #1.