Expansion and contraction cylinder