string.isLonger = function(s) return self.hasIndex(s.len) end function longest = "" lines = "" current = input while current if current.isLonger(longest) then lines = current longest = current else if not longest.isLonger(current) then lines += current end if current = input end while for i in range(0, lines.len, longest.len) print lines[i:i + longest.len] end for