Find all integers $n > 4$ st for every two subsets $A,B$ of $\{0,1,....,n-1\}$ , there exists a polynomial $f$ with integer coefficients st either $f(A) = B$ or  $f(B) = A$ where the equations are considered mod n.
We say two subsets are equal mod n if they produce the same set of reminders mod n. and the set $f(X)$ is the set of reminders of $f(x)$ where $x \in X$ mod n.
To solve the problem, we need to determine all integers \( n > 4 \) such that for every two subsets \( A, B \) of \(\{0, 1, \ldots, n-1\}\), there exists a polynomial \( f \) with integer coefficients such that either \( f(A) = B \) or \( f(B) = A \) where the equations are considered modulo \( n \).

### Case 1: \( n \) is not a prime number
#### Subcase 1.1: \( n = xy \) where \( x \) and \( y \) are coprime integers greater than 1
1. Define sets \( A = \{0, 1, \ldots, xy-1\} \) and \( B = \{x, y\} \).
2. Since \(|A| > |B|\), we need to show that there does not exist a polynomial \( f \in \mathbb{Z}[x] \) such that \( f(A) \equiv B \pmod{n} \).
3. Suppose such a polynomial \( f \) exists. Then there exist natural numbers \( i, j \in \mathbb{N} \) such that:
   \[
   f(i) \equiv x \pmod{y} \quad \text{and} \quad f(j) \equiv y \pmod{x}
   \]
4. Since \(\gcd(x, y) = 1\), by the Chinese Remainder Theorem (CRT), there exists a natural number \( a \) such that:
   \[
   f(a) \equiv x \pmod{y} \quad \text{and} \quad f(a) \equiv y \pmod{x}
   \]
5. This implies that \( f(a) \) is congruent to both \( x \) and \( y \) modulo \( xy \), which is a contradiction unless \( x = y \). Therefore, no such polynomial \( f \) exists.

#### Subcase 1.2: \( n = p^2 \) where \( p \) is an odd prime
1. Define sets \( A = \{0, 1, \ldots, p^2-1\} \) and \( B = \{1, 2, \ldots, p, p+1\} \).
2. Suppose there exists a polynomial \( f(x) \) such that \( f(A) \equiv B \pmod{p^2} \).
3. Since \( f(x) \) produces a complete residue system modulo \( p \), there exists a unique number \( i \in \mathbb{N} \) such that:
   \[
   f(i) \equiv 1 \pmod{p}
   \]
4. For each natural number \( k \), we have:
   \[
   f(i + pk) \equiv f(i) + pkf'(i) \pmod{p^2}
   \]
5. If \( p \mid f'(i) \), then all \( f(i + pk) \) values are \( 1 \pmod{p^2} \), which does not produce \( p+1 \).
6. If \(\gcd(p, f'(i)) = 1\), the values of \( f(i + pk) \) produce all numbers \( 1, p+1, 2p+1, \ldots, (p-1)p+1 \pmod{p^2} \), which is a contradiction. Therefore, no such polynomial \( f \) exists.

#### Subcase 1.3: \( n = 2^k \) where \( k \geq 3 \)
1. Define sets \( A = \{0, 1, 4, 5\} \) and \( B = \{0, 1, 2\} \).
2. Suppose there exists a polynomial \( f(x) \) such that \( f(A) \equiv B \pmod{8} \).
3. Without loss of generality, assume \( f(0) \) and \( f(4) \) are even. Since these numbers are equal modulo 4, they cannot be \( 0, 2 \pmod{8} \), which is a contradiction. Therefore, no such polynomial \( f \) exists.

### Case 2: \( n \) is a prime number \( p \)
1. For arbitrary natural numbers \( a_1, \ldots, a_p \), by Lagrange interpolation, there exists a polynomial \( f(x) \) with integer coefficients such that:
   \[
   f(i) \equiv a_i \pmod{p} \quad \text{for each } i
   \]
2. Therefore, for prime numbers \( p \), the condition is satisfied.

### Conclusion
The integers \( n > 4 \) that satisfy the condition are all prime numbers.

The final answer is all prime numbers \( \boxed{ p } \).