def getmaxlens(rows):
    """Get most length in rows and cols"""
    maxrowlen = 0
    maxcollen = 0
    for r in rows:
        maxrowlen = max(maxrowlen, len(r))
        for c in r:
            maxcollen = max(maxcollen, len(c))
    return maxrowlen, maxcollen