Number of characters and roots of unity (from Serre's Arithmetic) Let $m$ be a fixed positive integer and $p \nmid m$ be a prime. We denote by $\bar{p}$ its image in $G(m):=(\mathbb Z/ m\mathbb Z)^*$ and by $f(p)$ the order of $\bar{p}$. Let $g(p):=\phi(m)/f(p)$, the order of the quotient group $G(m)/(\bar{p})$. Let $W$ be the set of $f(p)$-th roots of unity. I wonder how to show the following proposition

For all $w\in W$, there exists $g(p)$ many characters $\chi :G(m) \to \mathbb C^*$ such that $\chi(\bar{p})=w$.

This is hard to me because I don't know how to characterize the characters of the group $G(m)$.
This is from Serre's a course in arithmetic, page 72. I attach the screenshot below:

 A: For your result you need to decompose your abelian group $G$ into a product of cyclic groups whose characters are obvious, the characters of $G$ are of the form $\chi(\prod_j g_j^{e_j}) = \prod_j e^{2i \pi a_j e_j/ord(g_j)}$ where the $g_j$ are the generators of those cyclic subgroups.
That decomposition can be found from the idea of maximal cyclic group : a cyclic subgroup such that adding one more element makes it non-cyclic. Thus you can assume one of the cyclic subgroup contains your element $\overline{p}$.
The alternative approach is to consider the subgroup $\ker(\chi \to \chi(\overline{p}))$ of characters such that $\chi(\overline{p})=1$ and find its size from the size of the group of characters and the group of $g(\overline{p})$-root of unity. Pick some $\psi(\overline{p}) = w$, then $\chi(\overline{p})=w$ iff $\chi \in \psi.\ker(\chi \to \chi(\overline{p}))$.
About the problem of generating all the Dirichlet characters : 
For a prime $p \ne 2$ then $\Bbb{Z}/p^k \Bbb{Z}^\times$ is cyclic with $\phi(p^k)= (p-1)p^{k-1}$ elements, take a generator $g$, the characters are $\chi(g^n)= e^{2i \pi an/\phi(p^k)}$ for each $a \in 0 \ldots \phi(p^k)-1$. With the CRT this extends to $\Bbb{Z}/m \Bbb{Z}^\times \cong \prod_{p^k \| m} \Bbb{Z}/p^k \Bbb{Z}^\times$ (consider some integer $\equiv g \bmod p^k$ and $\equiv 1 \bmod \frac{m}{p^k}$). The remaining case is $\Bbb{Z}/2^k \Bbb{Z}^\times \cong  \pm 1 \times  (\Bbb{Z}/2^k \Bbb{Z}^\times)/\pm 1$ where the latter group is cyclic.
