In the representation of numbers A and B as decimal fractions, the lengths of their minimal periods are equal to 6 and 12, respectively. What might the length of the minimal period in the similar representation of $A + B$ be? Find all answers and provide the sum of these possible lengths.

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