O(A(n,n))