LinesSwap: memory optimization O_o