longestLines problem