Filling in such a way that there are no gaps left