In Fourier Analysis on Number Fields, D. Ramakrishnan and R. J. Valenza propose the following exercise :

While the (a) is quite clear, I had a lot more trouble with the (b). My idea for it was the following:
Following the hint, we'll use the fact that the orbit of a rotation on the circle is either periodic or dense to find another element of $U\cap G$. Let $p_1,\dotsc,p_k:\mathscr{G}\to S^1$ be the projections which satisfy $p_i(U)\neq S^1$ and consider the sequence $(j(1)^n)_{n\in\mathbf{Z}}$. We start with $M=\mathbf{Z}$ and, for each $i$,
- if $p_i(j(1)^n)$ is periodic in $n$, we remove all the $n\in M$ such that $p_i(j(1)^n)\neq p_i(j(1))$;
- if $p_i(j(1)^n)$ is dense in $S^1$, we remove all the $n\in M$ such that $p_i(j(1)^n)\notin p_i(U)$.
In the end $M$ is still an infinite set. Then, if $n\in M-\{1\}$, $j(1)^n$ is another element of $U\cap G$ other than $j(1)$. This contradicts the fact that $U\cap G$ is a singleton.
I believe the bold sentence is true but I'm not so confident about it. Of course $M$ is infinite after the first stage but I haven't found an argument to justify it being infinite after the second stage.
I would appreciate some clarification and would also find it interesting if someone had another solution for this exercise.
(In the first stage, each one of the $p_i(j(1)^n)$ is of the form $e^{2\pi i q_in}$, where $q_i$ is a rational number. If $m$ is the lcm of the denominators of the $q_i$, then $M=m\mathbf{Z}$ after this stage.)
It's not entirely clear to me what the intended solution of the exercise is, but I can offer an alternative solution and a possible motivation for why the exercise is phrased as it is despite the fact that a nondiscrete Hausdorff group topology on $\Bbb Z$ is much easier to find, as the comments point out.
Let's start with the alternative solution, which is a general useful fact:
Lemma: Let $G$ be a compact topological group and $H\subseteq G$ a discrete subgroup. Then $H$ is finite.
Proof: Consider $\overline{H}$, which is a closed subgroup of $G$. Since $H$ is discrete we have that $H$ is an open subgroup of $\overline{H}$, indeed if $U\subseteq G$ is an open set such that $U\cap H=\{h\}$, we must also have $U\cap\overline{H}=\{h\}$, since points in $\overline{H}\setminus H$ have neighbourhoods meeting $H$ in infinitely many points. Since $H$ is an open subgroup of $\overline{H}$ it is also a closed subgroup of $\overline{H}$, which implies that $H=\overline{H}$, that is $H$ is closed in $G$. Since $G$ is compact so is $H$, but obviously a discrete compact space is finite.
Now the lemma applied to $j(\Bbb Z)$ shows that the subspace topology that $j(\Bbb Z)$ inherits from $\prod_\chi S^1$ is nondiscrete and since it clearly is a group topology we are done.
Now why is this construction useful? Because it is very general. Indeed for any Abelian group $G$ the elements of $G$ are separated by characters, meaning that for every $g\in G$, there is a group homomorphism $\chi_g\colon G\to S^1$ with $\chi_g(g)\neq 1$, which implies that the product map $j$ of the $\chi_g,g\in G$ $$j\colon G\to (S^1)^G$$ is injective, and by the lemma above we have again that $j(G)$ is not discrete in $(S^1)^G$. In other words every Abelian group $G$ admits a nondiscrete Hausdorff group topology. Groups admitting such a topology are also called topologizable and in light of the previous result the question of whether every group is topologizable is a natural one, but unfortunately it has a negative answer.