Bidirectional Quine Chain
Python 2, 93 bytes
There is a trailing linefeed.

p=1+2*bool(input())-1;s='print&quot;p=%r+2*bool(input())-1;s=%r*(p&gt;0);exec s&quot;%(p,s)'*(p&gt;0);exec s

Try it with input | Try it without input
This is modified from my answer on a similar question.
If there is input, then it will increment p. So the resulting program will be p=2+..., p=3+..., etc.