The coding is similar to the original, but we added the condition. And edges which are not just two sides. But because it is two -dimensional, it is four
The writing code is similar but we add straight condition. And the edge, which will not only have two sides. But because of two dimension is a four side