Question 23For each positive integer $n\ge1$, define $a_{n+1}=\frac1{1+a_n}$. Suppose $a_1=a_{2012}$. Find the sum of the squares of all possible values of $a_1$.