A base 7 three-digit number has its digits reversed when written in
base 9. Find the decimal representation of the number.