Exact sequences associated with a graph of groups