add exercise of prolog day3