Smart folder excluding tags

Is it possible to create smart folder with Exclusion? I tried multiple variants but never suceeded.
Example I have 2 smart folders called
AAA
BBB

and then I want to make one called CCC which includes everything else that is not in AAA and BBB.
AAA and BBB includes mails from specific contacts only.