A quine is a program which outputs its own source code.

A quine relay is a program whose output is source code for another program, whose output is the source code for another program, …, whose output is the source code for the original program.

The length of the quine relay is the number of programs in the cycle.

Here is a very impressive 128-language quine relay: github.com/mame/quine-relay

The command to install its dependencies is amusing:

$ sudo apt-get install afnix algol68g aplus-fsf aspectj asymptote ats2-lang \
    bash bc bf bsdgames bsh clisp clojure cmake coffeescript dafny dc dhall \
    elixir emacs-nox erlang f2c fish flex fp-compiler fsharp g++ gambas3-gb-pcre \
    gambas3-scripter gap gawk gcc gdb gdc generator-scripting-language genius \
    gforth gfortran ghc ghostscript gnat gnu-smalltalk gnucobol4 gnuplot gobjc \
    golang gpt groovy guile-3.0 gzip haxe icont iconx intercal iverilog \
    jasmin-sable jq kotlin ksh libpolyml-dev lisaac livescript llvm lua5.3 m4 \
    make maxima minizinc mono-devel mono-mcs mono-vbnc nasm neko nickle \
    node-typescript nodejs ocaml octave openjdk-11-jdk pari-gp parser3-cgi \
    perl php-cli polyml python3 r-base rakudo ratfor rc regina-rexx ruby \
    ruby-mustache rustc scala scilab-cli sed slsh spin squirrel3 surgescript \
    swi-prolog tcl tcsh valac vim wabt xsltproc yabasic yorick zoem zsh