Let $G$ be a finite 2-group. Denote by $S$ the set of central elements of $G$ of order exactly $2$. The relation $a\leq b$ iff there is an endomorphism of $G$ sending $b$ to $a$ defines a preorder on $S$. This preorder is readily seen not to be a partial order (consider the Klein four-group). For which 2-groups is this preorder total?
It is true for abelian $G$. It is true for $G$ of maximal class (because there is a unique central element of order exactly 2). For groups of intermediate nilpotency class, it can be either true or false, e.g. the property is not true for the group with GAP ID [16, 3] but it is true for the group with GAP ID [16, 4]. It can be seen using the following Sage code
g = gap.SmallGroup(InsertGAPIDhere);
checker1 = True;
list1 = gap.AsList(gap.Centre(g));
list2 = gap.AsList(gap.AllEndomorphisms(g));
for a in list1:
for b in list1:
if gap.Order(a) == 2 and gap.Order(b) == 2:
checker2 = False;
for m in list2:
if gap.Image(m, a) == b or gap.Image(m, b) == a:
checker2 = True;
checker1 = (checker1 and checker2);
print(checker1);