Lets say we have a sorted array, A = [1,2,2,3,7,7,7,9].
We want the output to look like:
[1]
[2,2]
[3]
[7,7,7]
[9]
This is m