public static <T extends Comparable<T>> void mergeSort(List<T>list){
		List<ListIterator<T>>iter=new ArrayList<>(Arrays.asList(null,null));
		for(int step=1;step<list.size();step+=step) {
			ListIterator<T>a=list.listIterator(), b=list.listIterator();
			for(;a.hasNext();) {
				for (int i=0;i<step&&b.hasNext();++i)b.next();
				iter.set(0, a);iter.set(1, b);
				merge(iter,step);
				a=iter.get(0);b=iter.get(1);
			}
		}
	}