$\mathbf{F}$ is a unitary DFT matrix where the $(m,n)$-th entry of $\mathbf{F}$ is given by $\frac{1}{\sqrt{M}}e^{-\imath2\pi(m-1)(n-1)/M}$. Note that $\imath=\sqrt{-1}$.
Let $\mathbf{A}$ be a matrix where the the $(m,n)$-th entry of $\mathbf{A}$ is given by $\frac{1}{\sqrt{M}}(-1)^{m-1}e^{-\imath2\pi(m-1)(n-1)/M}$.
Then how can $\mathbf{A}$ be transformed to $\mathbf{F}$ via some row or column pemutations?
$$(-1)^{m-1} = e^{\pi i (m-1)}$$
To see what's going on, it may help to write
$$\zeta = e^{2 \pi i / M}$$
and then write all of the exponentials as powers of $\zeta$, noting that the exponents only matter modulo $M$.