It depends on what your class structure is or what you're looking for in a class structure. If those are really the only columns in the tables then this way seems overkill and make for some less than optimal ways for accessing X & Y (classC.A.X & classC.B.X) but it would work. Maybe you could have some non-saved properties on ClassC that made those calls for you in a more succinct manner.
<class name="ClassA" table="A">
<id name="Id" column="ID">
<generator class="native"/>
</id>
<property name="x" column="X" />
</class>
<class name="ClassB" table="B">
<id name="Id" column="ID">
<generator class="native"/>
</id>
<property name="y" column="Y" />
</class>
<class name="ClassC" table="C">
<id name="Id" column="ID">
<generator class="native"/>
</id>
<many-to-one name="A" class="ClassA" column="A_ID"/>
<many-to-one name="B" class="ClassB" column="B_ID"/>
</class>
If C only has those columns, you could change this to use a composite id (look to the docs). Then, also depending on your wants, you could setup the cascading so you only ever messed with ClassC as far as CRUD went.