AC several problems, begin union-find problem