private int getKthSmallestRecursion(int ai, int bi, int k)
	{
		printStatus(ai, bi, k);
		
		if (k == 2) {
			return get2ndSmallest(ai, bi);
		}
	
		int half_k = (k - 1) / 2;
		
		int mid_ai = ai + half_k;
		int mid_bi = bi + half_k;
		int aval = a.get(mid_ai);
		int bval = b.get(mid_bi);
		
		if (aval == bval) {
			// Early exit condition
			return aval;
		} else if (aval < bval) {
			// Early exit condition
			if (k % 2 == 0) {
				if (bval < a.get(mid_ai+1)) return bval;
				// if k is even then aval cannot be k-th smallest
				++mid_ai; 
			} else {
				if (aval > b.get(mid_bi-1)) return aval;
			}
			// Continue the search
			return getKthSmallestRecursion(mid_ai, bi, k - half_k);
		} else {
			// Early exit condition
			if (k % 2 == 0) {
				if (aval < b.get(mid_bi+1)) return aval;
				// if k is even then bval cannot be k-th smallest
				++mid_bi;
			} else {
				if (bval > a.get(mid_ai-1)) return bval;
			}
			// Continue the search
			return getKthSmallestRecursion(ai, mid_bi, k - half_k);
		}
	}