While you can ask these type of homework questions here, do not expect an answer here.
To get started learning Prolog please use one of the free introduction books. ![]()
Just now in checking some facts created for the London Tube in Prolog this was listed in a Google search.