Given this data, where each person may optionally have a "smart" predicate, and each department may have zero or more people, I need to find departments that contain only the smart people. The result should only include departments 1 and 2. Ideally, the result should also include the "smart" objects for each department. Thanks!

```
person:A  p:type  'p' ;
          p:smart 'yes' .
person:B  p:type  'p' ;
          p:smart 'maybe' .
person:C  p:type  'p' .

department:1   p:type 'd' ;
               p:has  person:A, person:B .
department:2   p:type 'd' ;
               p:has  person:B .
department:3   p:type 'd' ;
               p:has  person:B, person:C .
department:4   p:type 'd' .

```