Final submission for CIS4301 extra credit (recursive query).