Let $a = 111\ldots111$ (forty ones) and $b = 111\ldots111$ (twelve ones). Determine the greatest common divisor of $a$ and $b$.

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