There is probably no easy answer to this question. Even the special case when all groups are of order 2 seems hopeless. While it is not the same as the problem of classifying all finite groups of order a power of 2, it is similar, and probably of about the same difficulty. Classifying groups of order 2n is known (or at least thought) to be a complete mess. The number of such groups grows rapidly with n:
1, 1, 2, 5, 14, 51, 267, 2328, 56092, 10494213, 49487365422
http://www.research.att.com/~njas/sequences/A000679http://oeis.org/A000679
Moreover if one actually looks at the collection of groups one gets, there does not seem to be much obvious nice structure. And if you change the prime 2 to some other prime such as 3, the answer you gets seems to change qualitatively: there are 2-groups that do not seem to be analogous to any 3-groups, and vice versa. Looking at the smallish groups of this form does not seem to give any hints of any usable structure on the set of groups with such an ascending chain of subgroups.
The people who classify 2-groups have presumably thought quite hard about this problem, and as far as I know have not come up with any easy solution: the groups are classified with a lot of hard work and computer time.