Let $G$ be a non-Abelian group such that $G^3 = 1$ and $G$ is a nilpotent class $2$ group, with order $3^{32}$. Our task is to determine the structure of the group $G$ or identify any information about the type of structure it possesses.
I only know that its structure will be something like a semi-direct product of cyclic groups of orders $3$, but I don’t know how many factors will be there. Like $C^{20}_3\rtimes C^{12}_3$ or something like $C^{10}_3\rtimes C^{10}_3\rtimes C^{12}_3.$
One more question is
Can I say that group $\mathbb Z^{k_{1}}_p\rtimes\mathbb Z^{k_2}_p\cdots\rtimes\mathbb Z^{k_r}_p$ ($p$is a fixed prime, $k_i\geq 2$) has nilpotent $r$-class with non-trivial action?
Please help to resolve this problem. Thank you in advance.
Since nobody has attempted to answer the main question, I will do so. The number of isomorphism classes of groups satisfying the conditions is huge, and I don't believe that any kind of enumeration of these isomorphism classes is computationally feasible. It is possible to give a general description of these groups - the difficult problem would be to decide when two such groups are isomorphic.
For a group $G$ of this type, let $|G'|=3^m$ and $n=32-m$. Then $G$ can be generated by $n$ elements $x_1,\ldots,x_n$. To define $G$ we need to specify the value of the $n(n-1)/2$ commutators $[x_i,x_j]$ with $1 \le i < j \le n$. Each such commutator is an element $z_{ij}$ of $G'$, where the $z_{ij}$ are required to generate $G'$.
Each such specification of the $z_{ij}$ defines a group in the class. If we write each $z_{ij}$ as a word in a generating set $y_1,\ldots,y_m$ of $G'$, then $G$ is defined by the presentation $$\langle x_i\,(1 \le i \le n),\ y_j\,(1 \le j \le m) \mid x_i^3=y_j^3=[x_i,y_j]=1\, \forall i,j,\ [x_i,x_j]=z_{ij}\,\forall i<j\rangle.$$ The requirement that the $z_{ij}$ generate $G'$ implies that $n \ge 8$, and we could consider the groups with $8 \le n \le 31$ as $24$ separate classes.
As I said above, deciding which of these groups are isomorphic is difficult and probably not computationally feasible because in principle we need to consider the actions of ${\rm GL}(n,3)$ and ${\rm GL}(m,3)$ on $G/G'$ and $G'$.
But we can do some rough estimates (as was done by G. Higman in his proofs of lower bounds on the number of isomorphism classes of $p$-groups). The number of possible $z_{ij}$ without considering the generating $G'$ requirement is $3^{mn(n-1)/2}$, but the vast majority of such choices will generate $G'$.
The number of such groups in any single isomorphism class is at most $|{\rm GL}(n,3)||{\rm GL}(m,3)| \le 3^{m^2+n^2}$, so we get at least $3^{mn(n-1)/2-m^2-n^2}$ isomorphism classes which, for example with $n=21,\,m=10$, gives at least $3^{1748}$ isomorphism classes.