First line is the data width, then the sand particles of each cell per row.
In particular I've implemented a standardised complete FILE * reader without relying on fseek (which may not work for pipes).