there country n city number 0 n 1 in country road connect pair citiesThere m friend number 0 m 1 travel country each path consist city each path represent integer array contain visit city order the path contain city city list consecutivelyGiven integer n 2D integer array path pathsi integer array represent path ith friend return length long common subpath share friend path 0 common subpath alla subpath path contiguous sequence city path Example 1input n 5 path 01234 234 40123output 2explanation the long common subpath 23example 2input n 3 path 012output 0explanation there common subpath share pathsexample 3input n 5 path 01234 43210output 1explanation the possible long common subpath 0 1 2 3 4 all length 1 constraints1 n 105 m pathslength2 m 105sumpathsilength 1050 pathsij nThe city list multiple time consecutively pathsi