What is the probability that the socks are paired?

There are $2N$ boxes with box number $\{1,2,\ldots,2N\}$. Every even number box contains $K$ left socks $\{A_1,A_2, \ldots, A_K\}$, and every odd number box contains $K$ right socks $\{B_1,B_2, \ldots, B_K\}$.

Note that these $K$ pairs of socks are different, and $A_k$ is paired with $B_k, \forall k$. For each sock type, there are $N$ copies in $N$ boxes. For example, there are $N$ socks ${A_1}$ contained in $\{2,4,\ldots,2N\}$ boxes, and each of them can be paired with $B_1$.

Then, if we randomly select one sock from each box, what is the probability that all the $2N$ socks are all paired?


Suppose you pick all the left socks first and obtain $n_i$ socks of type $A_i$. There are $\binom N{n_1,\dots,n_K}$ ways you could have obtained that sample and the same number of ways to pick the matching sample from the right socks, so the probability's numerator is $$f(N,K)=\sum_{n_1+\cdots+n_K=N}\binom N{n_1,\dots,n_K}^2$$ which is OEIS A287316, and the denominator is clearly $K^{2N}$.

The numerator has the generating function $$\sum_{n=0}^\infty\frac{f(n,k)}{n!^2}x^n=I_0^k(2\sqrt x)$$