2. (2002 Romania IMO and Balkan Mathematical Olympiad Selection Test (First Round)) Find all pairs of sets $A$ and $B$ such that $A$ and $B$ satisfy:
(1) $A \cup B=\mathbf{Z}$;
(2) If $x \in A$, then $x-1 \in B$;
(3) If $x \in B, y \in B$, then $x+y \in A$.
2. If $0 \in B$, by (3) we know that for all $x \in B, 0+x \in A$, so, $B \subset A$. Also by (1) we know $A=\boldsymbol{Z}$. By (2) we know for $\forall x \in A$, $x-1 \in B$, thus, $B=\boldsymbol{Z}$.

If $0 \notin B$, by (1) we know, $0 \in A$. By (2) we know, $-1 \in B$. By (3) we get $-2=(-1)+(-1) \in A$, and then $-3 \in B$, $-4 \in A, \cdots$. Therefore, by mathematical induction it is easy to prove that $-2n \in A, -2n-1 \in B$ for all non-negative integers $n$.
If $2 \in B$, then $1=2+(-1) \in A$, by (2) we know, $1-1=0 \in B$, which is a contradiction. Therefore, $2 \notin B, 2 \in A, 1=2-1 \in B$.
Next, we prove that for all $n$, $2n \in A, 2n \notin B$.
If not, then there exists a smallest $n (n>1)$ such that $2n \in B$. Since $-1 \in B$, we have $2n-1 \in A$. By (2) we know, $(2n-1)-1=2(n-1) \in B$, which contradicts the minimality of $n$. Therefore, when $n \geqslant 1$, $2n \in A$, and thus, $2n-1 \in B$, meaning all positive even numbers belong to $A$, and all positive odd numbers belong to $B$.

If $-2n \in B$, where $n$ is a positive integer, by $2n+1 \in B$ and (3) we get $1 \in A$, and by (2) we get $0 \in B$, which is a contradiction. Therefore, all even numbers belong to $A$ but not to $B$.
If there is an odd number $2n+1 \in A$, by (2) we get $2n \in B$, which is a contradiction.
Therefore, $A=2\boldsymbol{Z}, B=2\boldsymbol{Z}+1$.