New solution 6fifo.c