[X,Y,Z]

f(f(X,Y),Z) -> f(X,f(Y,Z)).
f(X,f(Y,Z)) -> f(Y,Y).



