Let $G$ be free abelian of rank $n$ and $H \subseteq G$ a subgroup also of rank $n$. It is known that $G/H$ is finite, in fact a direct sum of at most $n$ cyclic groups. Thus we can write $$G/H = \langle x_1,\ldots,x_n | d_1x_1 = \cdots =d_nx_n = 0\rangle,$$ where the $d_i$'s are the orders of those cyclic groups. From here why does it follow that there is a basis $\beta_1,\ldots,\beta_n$ of $G$ such that $d_1\beta_1,\ldots ,d_n\beta_n$ is a basis for $H$?
Thanks!