Glucose first reacts with phenyl hydrazine giving phenylhydrazone. Then the adjacent —CHOH group is oxidized by a 2nd phenyl hydrazine molecule and itself is reduced to aniline. The resulting carbonyl group reacts with 3rd phenyl hydrazine molecule giving osazone.