pipeline.py: change order of input links

to have less duplicates