Indexing tensor based on another tensor value

I have 2 tesnor and I want to create 3rd tensor based on the value of 1st tensor as index in 2nd tensor as below-

since 1st value of a=8, 2nd value of a=1… So I want b[8], b[1] and so on… like below.
output= ([8,1,2,3,4,6,5,7,8])
So basically output is tensor b[value of a]. How to do that?

No need of solution solved it - b[a]