Does anyone know any sufficient conditions so that the following diagrams, $\require{AMScd}$
\begin{CD}
(X,\tau_X) @>f>> (Y,\tau_Y)\\
@V g V V @AA h A\\
(Z,\tau_Z) @>>\operatorname{id}_Z> (Z,\tau_Z)
\end{CD}
and, \begin{CD}
(X,\tau_X) @<<f< (Y,\tau_Y)\\
@A g A A @VV h V\\
(Z,\tau_Z) @<<\operatorname{id}_Z< (Z,\tau_Z)
\end{CD}
commutes for some $h$ where $(X,\tau_X),(Y,\tau_Y)$ and $(Z,\tau_Z)$ are topological spaces and $f:(X,\tau_X)\to(Y,\tau_Y)$ and $g:(Y,\tau_Y)\to(Z,\tau_Z)$ are given continuous maps?