6. Given $t$ is a real number. Find all functions $f: \mathbf{R} \rightarrow \mathbf{R}$ such that
$$
f(x+t+f(y))=f(f(x))+f(t)+y .
$$
(2014, Croatian Mathematical Olympiad)
Let $x=y=-t$, we get $f(t)=t$.
Let $x=-t, y=t$, we get $f(f(-t))=-t$.
Let $f(-t)=a, x=t, y=a$, we get $a=-t$.
Finally, let $y=-t$ and $x=-t$, we get the solution of the function as $f(x)=x$.