public UnionFind(int N)
	{
		componentCount = N; // Initially assume that all nodes are in different
		// components, components containing just themselves
		id = new int[N]; // allocate memory
		height = new int[N];
		sz = new int[N];

		// Initialise
		for (int i = 0; i < N; i++)
		{
			id[i] = i;
			height[i] = 0;
			sz[i] = 1;
		}
	}