public function through(
        string $variable = null,
        string $type = null,
        string $direction = 'BOTH'
    ): self {
        if ($this->elements->size() < 3) {
            throw new LogicException;
        }

        $direction = \strtolower($direction);

        $path = new self;
        $path->elements = $this
            ->elements
            ->dropEnd(2)
            ->add(Relationship::$direction($variable, $type))
            ->add($this->elements->last());
        $path->lastOperation = Relationship::class;

        return $path;
    }