Here's the naive approach:
sorted(Input, key=Ref.index)
Or in-place:
Input.sort(key=Ref.index)
Either way it's just one line.
Although I think it's slow -- O(n*m) where n and m are the lengths of Input and Ref. @rusu_ro1's solution uses a similar method but seems to be O(n+m).