For example, n = 2, then the lines:
"" "0" "1" "00" "01" "10" "11" There is no need to store already scanned strings. At the moment, I am generating by adding '0' and '1' to all rows of the previous dimension, storing everything in the List. It works fast, but takes a lot of space, and the List is not infinite.