you n garden label 1 n array path pathsi xi yi describe bidirectional path garden xi garden yi in garden want plant 4 type flowersAll garden 3 path come leave ityour task choose flower type garden garden connect path different type flowersreturn choice array answer answeri type flower plant i1th garden the flower type denote 1 2 3 4 it guarantee answer exist Example 1input n 3 path 122331output 123explanationgardens 1 2 different typesgarden 2 3 different typesgarden 3 1 different typeshence 123 valid answer other valid answer include 124 142 321example 2input n 4 path 1234output 1212example 3input n 4 path 122334411324output 1234 Constraints1 n 1040 pathslength 2 104pathsilength 21 xi yi nxi yiEvery garden 3 path come leave