-- implemented algorithm for extracting the strings diagonally from the lattices, from top left to bottom right, excluding the edges we do not need (the ones that produce only 1-character strings)