title: Depth first search algorithm using prolog
body: <p>Given a list of positive integer Items whose elements are guaranteed to be in sorted ascending order, and a positive integer Goal, and Output  is a list of three elements [A,B,C] taken from items that together add up to goal. The Output must occur inside the items list in that order (ascending order).</p>
  <p>I didn't know how to solve this problem in prolog
  I want a help</p>