public static int f (int x, int y, int z) { if (x <= y) { return z; } else { return f (f (x-1,y,z), f(y-1,z,x), f(z-1,x,y)); } }