### how can I manipulate a multiplicative group of Zmod(n)

Hi,

I want to create the multiplicative group ~~$(\mathbb{Z}/7\mathbb{Z})^*=\{1,2,3,4,5,6\}$ so ~~$(\mathbb{Z}/7\mathbb{Z})^*=\{1,2,3,4,5,6\}$.

I did these steps:

```
sage: n = 7
sage: Zn = Zmod(n)
sage: G = Zn.unit_group()
sage: list(G)
[1, f, f^2, f^3, f^4, f^5]
```

Then I want to create the subgroups generated by $2=f^2$ which is ~~$\{1,2,4\}$
So ~~$\{1,2,4\}$.

I did the following steps:

```
sage: f = G.gen()
sage: H =
```~~G.subgroup([f^2])
~~G.subgroup([f^2])
sage: ~~list(H)
~~list(H)
[1, f, f^2]

My problem is when I did

`sage: `~~Zn(f)
~~Zn(f)
3

But here `f`

needs to be 2. How can I solve this? Replace `f`

by value?