Given three variables x, y, z write a function to circularly shift their values to right. In other words if…