def N=10:

proc copy(chan in, out)=
	var char:
	seq
		char:='x'
		while char<>EOF
			seq
				in ? char
				out ! char
:

chan junk[N]:
par
	copy(input, junk[0])

	par i=[0 FOR N-1]
		copy(junk[i], junk[i+1])

	var char:
	seq
		junk[N-1] ? char
		while char<>EOF
			seq
				output ! char
				junk[N-1] ? char
