The letters $A, B$ and $C$ are used to form every possible three letter ``word.'' When these ``words'' are arranged in alphabetical order and numbered so that $AAA$ is Word 1 and $CCC$ is Word 27, what number will correspond to the position of word $BAB$ on the list?
<|im_start|>system
You are a helpful assistant.<|im_end|>
<|im_start|>user
The letters $A, B$ and $C$ are used to form every possible three letter ``word.'' When these ``words'' are arranged in alphabetical order and numbered so that $AAA$ is Word 1 and $CCC$ is Word 27, what number will correspond to the position of word $BAB$ on the list?
Please reason step by step, and put your final answer within \boxed{{}}.<|im_end|>
<|im_start|>assistant

user
11
The letters $A, B$ and $C$ are used to form every possible three letter ``word.'' When these ``words'' are arranged in alphabetical order and numbered so that $AAA$ is Word 1 and $CCC$ is Word 27, what number will correspond to the position of word $BAB$ on the list?
train