The concept of this doesn't use much buffers and is useful even for extremely large files or endless streams in pipes. It should be better than any other solution provided so far. You also don't have to wait to get to the end before it starts printing the lines.
awk 'BEGIN{X = 2; getline; a[NR % X] = $0; getline; a[NR % X] = $0}{print a[NR % X]; a[NR % X] = $0}'
NR could also be replaced with another counter that resets itself to 0
if limit of NR is concerned. Also it would depend on the implementation of awk how it cleans itself up and reuse memory on every N
lines of input
but the concept is there already.
awk 'BEGIN{X = 2; for(i = 0; i < X; ++i)getline a[i]}{i %= X; print a[i]; a[i++] = $0}'