ordering

file1

1 SNP2 3
1 SNP3 3
1 SNP5 4
2 SNP1 4
2 SNP4 4

file2

SNP1 1 1 1
SNP5 5 5 5
SNP4 4 4 4
SNP2 2 2 2
SNP3 1 1 1

desired output

SNP2 2 2 2 
SNP3 3 3 3
SNP5 5 5 5
SNP1 1 1 1
SNP4 4 4 4

note that file1 and file2 has the same SNPs, in different order.
but i want desired output in the same SNP order as file1.
thanks!

$ awk 'FNR==NR{a[$1]=$0;next}{print a[$2]}' file2 file1