* {
  font-size: 0;
  margin: 0;
  padding: 0;
}
section {
  display: flex;
  flex-wrap: wrap;
  width: 300px;
}
span {
  background: black;
  color: white;
  font-size: 11px;
  height: 100px;
  width: 100px;
}
span:nth-child(-n+5) {
  order: 1;
}
span:nth-child(4),
span:nth-child(5) {
  margin-left: 200px;
}
span:nth-child(6) {
  order: 4;
}
span:nth-child(7) {
  order: 3;
}
span:nth-child(8) {
  order: 2;
}
span:nth-child(n+9) {
  order: 5;
}
span:nth-child(9),
span:nth-child(10) {
  margin-right: 200px;
}