As the Soviets began their withdrawal, the jihad's leaders debated what to do next.
( ( As ( ( the Soviets ) ( began ( their withdrawal ) ) ) ) ( , ( ( ( the ( jihad 's ) ) leaders ) ( ( debated ( what ( to ( do next ) ) ) ) . ) ) ) )
(ROOT (S (SBAR (IN As) (S (NP (DT the) (NNPS Soviets)) (VP (VBD began) (NP (PRP$ their) (NN withdrawal))))) (, ,) (NP (NP (DT the) (NN jihad) (POS 's)) (NNS leaders)) (VP (VBN debated) (SBAR (WHNP (WP what)) (S (VP (TO to) (VP (VB do) (ADVP (JJ next))))))) (. .)))
When Soviets withdrew, jihads debated on what to do. 
( ( When ( Soviets withdrew ) ) ( , ( jihads ( ( debated ( on ( what ( to do ) ) ) ) . ) ) ) )
(ROOT (S (SBAR (WHADVP (WRB When)) (S (NP (NNPS Soviets)) (VP (VBD withdrew)))) (, ,) (NP (NNS jihads)) (VP (VBZ debated) (PP (IN on) (SBAR (WHNP (WP what)) (S (VP (TO to) (VP (VB do))))))) (. .)))