void asserts(T[] S, T p) {
		assert 0 <= i1;
		assert i1 <= m1;
		assert m1 <= i2;
		assert i2 <= m2;
		assert i3 <= n;

		for (int j=0; j<= i1-1; j++) {
			assert S[j].compareTo(p) < 0;
		}

		for (int j=m1; j<= i2-1; j++) {
			assert S[j].compareTo(p) == 0;
		}

		for (int j=m2; j<= i3-1; j++) {
			assert S[j].compareTo(p) > 0;
		}

	}
	
//	void quicksort(T[] A, int left, int right) {
//		if (!(left < right)) return;
//		
//		int q = partition(A, left, right);
//		
//	}