<garvit244>1042_1.py
def gardenNoAdj( N, paths):
    plant = [1, 2, 3, 4]
    result = [0 for _ in range(N)]
    if not paths:
        return [plant[index%4] for index in range(N)]
    change = {}
    update = []
    for path in paths:
        x, y = path[0]-1, path[1]-1
            
        if x in change:
            change[x].append(y)
        else:
            change[x] = [y]
            
        if y in change:
            change[y].append(x)
        else:
            change[y] = [x]
    
    for garden in range(N):
        color_used = []
        if garden in change:
            subgarden = change[garden]
            for subgarden in change[garden]:
                if result[subgarden]:
                    color_used.append(result[subgarden])
        color_rem = list(set([1, 2, 3, 4]) - set(color_used))
        for color in color_rem:
            result[garden] = color
            break
    return result
def sample_funcname ( var_0 , var_1 ) :
    var_6 = [ 1 , 2 , 3 , 4 ]
    var_10 = [ 0 for var_8 in range ( var_0 ) ]
    if not var_1 :
        return [ var_6 [ var_11 % 4 ] for var_11 in range ( var_0 ) ]
    var_12 = { }
    var_13 = [ ]
    for var_14 in var_1 :
        var_15 , var_16 = var_14 [ 0 ] - 1 , var_14 [ 1 ] - 1
        if var_15 in var_12 :
            var_12 [ var_15 ].append ( var_16 )
        else :
            var_12 [ var_15 ] = [ var_16 ]
        if var_16 in var_12 :
            var_12 [ var_16 ].append ( var_15 )
        else :
            var_12 [ var_16 ] = [ var_15 ]
    for var_18 in range ( var_0 ) :
        var_19 = [ ]
        if var_18 in var_12 :
            var_20 = var_12 [ var_18 ]
            for var_20 in var_12 [ var_18 ] :
                if var_10 [ var_20 ] :
                    var_19.append ( var_10 [ var_20 ] )
        var_23 = list ( set ( [ 1 , 2 , 3 , 4 ] ) - set ( var_19 ) )
        for var_24 in var_23 :
            var_10 [ var_18 ] = var_24
            break
    return var_10
