a := nil; b := nil; if a then c := b; if b then d := a; a := nil; b := nil; while a do begin c := b; b := c end; if b then d := a