The pullback functor is an adjoint

Recall the notion of pullbacks, which for the sake of this exercise we will only consider in the category Set.

Show that the functor which assigns to each diagram of the form Xβ†’fZ←gY in Set the pullback XΓ—ZY is a right adjoint of another functor. Describe the unit and counit of the adjunction.

Note

You don't need to check every tiny detail for this one. Define the pullback as a functor (giving the maps on objects and arrows), and then explicitly define the set map that should be a natural bijection between the appropriate hom-sets.