Singular: Adj. Noun  
   masculine & neuter -ому #- & o-declensions
   feminine -ой a-declension
Plural (all genders) -ым -ам all declensions
The normal spelling rules apply:
Rule A applies to the ending -ым, so it is spelled -им after velars and noisy consonants other than ц, e.g. такќм. Rule B applies to -ому/-ой, so they are spelled -ему/-ей unstressed after noisy consonants, e.g. хорћшему. The ending -у becomes -ю after palatalized consonants and the sound /y/. Feminine nouns that end in -ия have the ending -ии.
masculine & neuter feminine
пљрвому студљнту (студљнт) пљрвой студљнтке (студљнтка)
хорћшему учќтелю (учќтель) хорћшей учќтельнице (учќтельница)
хорћшему музљю (музљй) ітой истћрии (истћрия)
такќм студљнтам (студљнт) такќм студљнткам (студљнтка)
хорћшим музљям (музљй) ітим истћриям (истћрия)