Given a standard combination lock like the one in the picture. The way to unlock it is to align the 4 numbers in the code on the combination line. After years of loyal service you have been fired from the lock factory and have decided to exact revenge by not jumbling up the locks before you send them off, thus leaving every lock with the combination to unlock it on the combination line.
You also know that by looking at the order of the numbers in the other lines it is possible to work out what numbers must be on the combination line (and therefore the combination to unlock it is).
If every line on the lock is given a number starting from line 0 for the combination line (the line which unlocks the lock) to line 9. For example, if the numbers on line 4 are
5336, then the combination to unlock it would be
Unfortunately the locks have already been packaged and your view of each lock is obscured, so you can only see numbers on different lines of the lock.
Given 4 pairs of digits, where the first digit of the integer represents the line number and the second digit represents the the number which appears on that line, work out the combination to the lock. For example if you input:
57 23 99 45
Then it should output:
25 78 63 15
Assume the input will always be 4 positive integers in the form `25 64 72 18.
This is code-golf, so the shortest programs in number of bytes wins.
Also this is my first question, so any feedback is appreciated.