© 1965-2012 IEEE.The two-dimensional magnetic recording (TDMR) technology promises storage densities of 10 Tbits/in2. However, when tracks are squeezed together, a bit stored in the two-dimensional (TD) grid suffers inter-symbol interference (ISI) from adjacent bits in the same track and inter-track interference (ITI) from nearby bits in the adjacent tracks. A bit is highly likely to be read incorrectly if it is isolated in the middle of a $3 \times 3$ square, surrounded by its complements, horizontally and vertically. We improve the reliability of TDMR systems by designing TD constrained codes that prevent these square isolation patterns. We exploit the way TD read heads operate to design our codes, and we focus on TD read heads that collect signals from three adjacent tracks. We represent the two-dimensional square isolation constraint as a one-dimensional constraint on an alphabet of eight non-binary symbols. We use this new representation to construct a non-binary lexicographically-ordered constrained code where one third of the input information bits are unconstrained. Our TD constraint codes are capacity-achieving, and the data protection is achieved with redundancy less than 3% and at modest complexity.