reverse a string based on else

I have a file like this:

Dog Cat One ABCDEFGHIJ house
Dog Cat Two ABCDEFGHIJ house
Cat Cat One ABCDEFGHIJ house
Cat Cat Two ABCDEFGHIJ house

I want to look at $3 and if it says "Two" print out the line except reverse $4.

Dog Cat One ABCDEFGHIJ house
Dog Cat Two JIHGFEDCBA house
Cat Cat One ABCDEFGHIJ house
Cat Cat Two JIHGFEDCBA house

I was trying to just use a substring 'for loop'

awk '{

if ($3 == "One") print $1, $2, $3, $4, $5;
else if ($3 == "Two") print $1, $2, $3, for(i=length($4);i>=1;i--)
print substr($4,i,1), $5

}' infile > outfile &

This isn't working and obviously I'm lost.

Any help would be fantastic.

nawk '$3=="Two" {rev="";for(i=1;i<=length($4);i++) rev=substr($4,i,1) rev; $4=rev}1' infile > outfile

Wow thanks so much :b:

perl -ne '{my @tmp=split;if($tmp[2] eq "Two"){$tmp[3]=reverse $tmp[3];}print join " ",@tmp;print "\n";}' yourfile
nawk '
function reverse(str)
{
   res=""
   for(i=length(str);i>=1;i--)
     res=sprintf("%s%s",res,substr(str,i,1))
   return res;
}
$3=="Two" {$4=reverse($4)} 1' yourfile