Hi
There's a problem with n1 and n2: they're likely referring to texts that are next to each other.
But that's unlikely to happen because it depends on the order in which they are found in the database.
You should create a function that:
1) compares the texts in the two columns
2) relates each pair of texts because they both have the same x coordinate (with a maximum range of 1/2 the height of both texts)
3) creates a list for each columns sets with the texts in order from highest Y to lowest.
Then modify your 'repeat' to iterate over the members of both lists: (nth ind lstColumn1) will always be in the same row as (nth ind lstColumn2)