Consider the following maximization version of the 3-Dimensional Matching Problem. Given disjoint sets $X, Y,$ and $Z,$ and given a set $T \subseteq X \times Y \times Z$ of ordered triples, a subset $M \subseteq T$ is a 3 -dimensional matching if each element of $X \cup Y \cup Z$ is contained in at most one of these triples. The Maximum 3-Dimensional Matching Problem is to find a 3-dimensional matching $M$ of maximum size. (The size of the matching, as usual, is the number of triples it contains. You may assume $|X|=|Y|=|Z|$ if you want.
Give a polynomial-time algorithm that finds a 3 -dimensional matching of size at least $\frac{1}{3}$ times the maximum possible size.