Longest Lines complete solution