family tree written in prolog