Completeness of exponentials and Beurling's theorem regarding Fourier transform on $\mathbb{R}^n$ and $\mathbb{T}^n$