Abelian groups and Homology groups

Given an abelian group $\displaystyle G$, and a natural number $\displaystyle n$, does there exist a space X such that $\displaystyle H_n(X)=G$?

Where $\displaystyle H_n(X)$ is the n-dimensional homology group of X.

I know that for every group $\displaystyle G$, there is a 2-dimensional cell complex $\displaystyle X_G$ such that the fundamental group of $\displaystyle X_G$ is isomorphic to $\displaystyle G$.

Can we generalize this result to the homology groups, when $\displaystyle G$ is abelian? If yes, how do you prove this