The existence of a common set of representatives deduced from graph theory

Hey I'm stuck at the following problem: Let $k,n$ be positive integers and let $X$ be a set of size $kn$. Use a result about graphs from the lecture to prove that for any two partitions (disjoint union) $$X=\bigcup_{i=1}^{n}U_i \hspace{0.2cm} \text{and} \hspace{0.2cm} X = \bigcup_{i=1}^{n}V_i $$ with $|{U_i}|=|V_i|=k$ for all $i \in \{1,2,\dots, n\}$, there exists a common set of representatives $Y\subseteq X$ (i.e. $|U_i \cap Y| = |V_i\cap Y|=1$ for all $i$). Any help is appreciated, I simply don't see how to transfer this to any result of graph theory.


Hint: Build a bipartite graph as follows:

  • The first part will contain $n$ vertices corresponding to the $U_i$'s
  • The second part will contain $n$ vertices corresponding to the $V_i$'s
  • A vertex $i$ from the first part will be connected with a vertex $j$ from the second part if and only if $U_i \cap V_j \neq \emptyset$.

Does this graph have a perfect matching?