The base-7 representation of the number \( n \) is \( \overline{abc}_{(7)} \), and the base-9 representation of the number \( n \) is \( \overline{cba}_{(9)} \). What is the decimal (base-10) representation of \( n \)?

Let's think step by step and output the final answer within \boxed{}.
user