Print paragraph if it contains AAA (blank lines separate paragraphs)
sed -e '/./{H;$!d;}' -e 'x;/AAA/!d;'
NOTE: HHsed v1.5 must insert a 'G;' after 'x;'