.wrapper {
display: grid;
grid-gap: 1rem;
grid-template-columns: 1fr 1fr 1fr;
grid-auto-flow: dense;
padding: 1rem;
}
.box {
background-color: red;
color: #fff;
border-radius: 0.5rem;
padding: 1rem;
font-size: 200%;
}
.a,
.d,
.e,
.f {
background-color: green;
grid-column: span 2; /* <-- here is the trick */
}