sample of First file (2187 *1)
P19113
Q9ULJ8
P00488
P35228
P37059
P06737
Q13423
P11766
P48728
P50213
Sample of 2nd file
P00352 Q13683 Q9ULJ8 P10124 P50213 Q13153 P19113
P19113 3 3 4 3 3 4 3
Q13423 2 1 5 4 2 1 1
P50213 1 2 3 1 4 5 4
Q9ULJ8 1 2 4 5 6 2 5
I need the output in the below format,
Q9ULJ8 P50213 P19113
P19113 3
Q9ULJ8 4
P50213 5