from functools import reduce


def modeOfLengths(input):
    """
    PROTOTYPE:
      modeOfLengths(input)
    DESCRIPTION:
      Finds the mode (most frequently occurring value) of the lengths of the lines.
    ARGUMENTS:
      - input is list of lists of data
    RETURNS:
      mode as integer
    """
    freq = {}
    for row in input:
        l = len(row)
        freq[l] = freq.get(l, 0) + 1

    return reduce(lambda a, b, freq = freq: (freq[a] > freq[b]) and a or b, freq.keys())