Three identical circles are packed into a unit square. Each of the three circles is tangent to each other and tangent to at least one side of the square. If $r$ is the maximum possible radius of the circle, what is $(2-\frac{1}{r})^2$?

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