find string and replace with string in other file

Dear all,
I need your help, I have file like this:

file1:

23456
01910964830098775635
34567
01942809546554654323
67589
26546854368698023653
09778
58716868568576876878
08675
86178546154065406546
08573
54165843543054354305
.
.

file2:

23456  25
34567  26
67589  27
09778  56
08675  58
08573  34
.
.

I want find and replace string,

desired output:

25
01910964830098775635
26
01942809546554654323
27
26546854368698023653
56
58716868568576876878
58
86178546154065406546
34
54165843543054354305

thank for advance,

attila

Hi

$ awk 'NR==FNR{a[$1]=$2;next}{if($0 in a)print a[$0];else print;}' file2 file1
25
01910964830098775635
26
01942809546554654323
27
26546854368698023653
56
58716868568576876878
58

Guru.

count=0
while read Line
do
let count=count+1
let check=$count%2
if [ $check -eq 1 ]; then
        awk "/$Line/"'{print $2}' file2.txt >> file3.txt
else
        echo $Line  >> file3.txt
fi
done < file1.txt