# swap(f,x,y) is exchange x and y in f; swap(f_,x_,y_):=replace(replace(replace(f,x,zz),y,x),zz,y);