Brace Expansion
Given a string `S` containing lowercase letters and non-nested brace groups, expand every brace group into all of its comma-separated alternatives. Return the Cartesian product of the choices sorted in lexicographical order. A literal string with no braces expands to itself.