Function to add edges
def addedge ( a , b ) : NEW_LINE INDENT if ( a not in tree ) : NEW_LINE INDENT tree [ a ] = [ ] NEW_LINE DEDENT tree [ a ] . append ( b ) NEW_LINE if ( b not in tree ) : NEW_LINE INDENT tree [ b ] = [ ] NEW_LINE DEDENT tree [ b ] . append ( a ) NEW_LINE DEDENT def FindCenter ( n ) : NEW_LINE