Let $q$ be a real number. Margaret wrote 10 distinct real numbers in a line. Then she adds three more lines as follows:
$\triangleright$ on the $2^{\text {nd }}$ line, she writes all numbers of the form $a-b$, where $a$ and $b$ are real numbers (not necessarily distinct) from the $1^{\text {st }}$ line;
$\triangleright$ on the $3^{\text {rd }}$ line, she writes all numbers of the form $q a b$, where $a$ and $b$ are real numbers (not necessarily distinct) from the $2^{\text {nd }}$ line;
$\triangleright$ on the $4^{\text {th }}$ line, she writes all numbers of the form $a^{2}+b^{2}-c^{2}-d^{2}$, where $a, b, c$ and $d$ are real numbers (not necessarily distinct) from the $2^{\text {nd }}$ line.
Find all real numbers $q$ such that, regardless of the 10 numbers written on the $1^{\text {st }}$ line, every number on the $3^{\text {rd }}$ line is also on the $4^{\text {th }}$ line.
We will say that a real number $q$ is good if it has the property required in the statement. First of all, it is clear that if $q$ is good, then $-q$ is also good, and vice versa. On the other hand, $q=0$ is obviously good. We are therefore looking for good real numbers $q>0$, if there are any.
Let $\lambda$ be a large real number and let $\varepsilon=1 / \lambda$. Suppose Margaret has written ten numbers $x_{1}, \ldots, x_{10}$ such that $0 \leqslant x_{1}<\ldots<x_{8} \leqslant \varepsilon, x_{9}=1$ and $x_{10}=\lambda$. Then the 2nd line contains the numbers $\pm \lambda, \pm(\lambda-1)$ and $\pm 1$, as well as elements of the set $\Omega_{2}=[0,1] \cup[\lambda-\varepsilon, \lambda]$ and their opposites. In particular, Margaret therefore writes the reals $q \lambda^{2}$ and $q \lambda$ on the 3rd line.

We then consider a number from the 4th line, of the form $z=a^{2}+b^{2}-c^{2}-d^{2}$, and such that $z \geqslant 0$. Each of the reals $a^{2}, b^{2}, c^{2}, d^{2}$ belongs to the set $\left\{0, \lambda^{2}\right\}+\{-2 \lambda, 0\}+[0,2]$, so $z$ belongs to the set $\Omega_{4}=\left\{0, \lambda^{2}, 2 \lambda^{2}\right\}+\{-4 \lambda,-2 \lambda, 0,2 \lambda, 4 \lambda\}+[-4,4]$.
If $q$ is good, then $q \lambda^{2}$ and $q \lambda$ belong to $\Omega_{4}$, so by letting $\lambda$ tend to $+\infty$ we deduce respectively that $q \in\{1,2\}$ and that $q \in\{2,4\}$. This shows that only $q=2$ is likely to be good.
Conversely, if $q=2$, every number on the 3rd line is of the form $2(a-b)(c-d)$ with $a, b, c, d$ reals from the 1st line. Since $2(a-b)(c-d)=(a-d)^{2}+(b-c)^{2}-(a-c)^{2}-(b-d)^{2}$, this number also appears on the 4th line. Therefore, the good reals are $-2, 0$, and $2$.