Ancient puzzle mechanisms can still function perfectly after centuries