0(n^2) solution for street numbers