I have a list of lists of strings and I need to format them into a triangle using periods such that each list is on its own line, and the strings of each list are separated by at least one period. Additionally, each character must have dots above and below. This is probably best explained by example:

```
> dots [["test"], ["hello", "world"], ["some", "random", "words"], ["even", "more", "random", "words"]]

```

should return

```
............test.....................
.......hello.......world.............
...some......random......words.......
not....really......random.....anymore

```

Finally, it should use the least amount of periods possible, i.e. the approach of padding out every word to the length of the maximum word is too wasteful; that is the above example should not return

```
.....................test........................
..............hello.........world................
.......some..........random........words.........
not...........really........random........anymore

```

I can easily write the a function that does the put the periods either side to make it into a triangle shape, my problem is with the periods in between words.

I have a function that works as long as the word length is 1, which is obviously pretty useless for the task. Nevertheless, my function `dots`:

```
dots :: [[String]] -> [[String]]
dots xss = map dots' xss
    where dots' (x:[]) = [x]
          dots' (x:xs) = [x] ++ ["."] ++ dots' xs

```

This is a homework exercise, so hints would be preferred, but I've been trying to do this for hours with no luck.