This invention relates to compounds for the inhibition of histone deacetylase.More particularly, the invention provides for compounds of formula compoundsof the Formula (I) and N-oxides, hydrates, solvates, pharmaceutically acceptablesalts, prodrugs and complexes thereof, and racemic and scalemic mixtures, diastereomersand enantiomers thereof, wherein groups L, M, X and Y are as defined herein.