Exercise 9: Create dynamic groups