Browse each sentence twice : first to get the index of dependency target of the current token, then to print it when on the current token