Let’s take this sentence from Virgil's Aeneid, Book 2 : 'tempus erat quo prima quies mortalibus aegris incipit et dono divum gratissima serpit'. Let's analyse each ending. First, sort the nouns from the verbs and adjectives- breaking down a sentence into its components will make things much simpler. Nouns: tempus, quies, aegris, dono, divum, Verbs: erat, incipit, serpit, Adjectives: prima, mortalibus, gratissima, Other: quo (pronoun), et (conjunction).‘Tempus’ is the subject of the sentence because it is in the nominative case (it is in the 3rd declension so must therefore be nominative in this form). What about ‘aegris’? Well it comes from the noun ‘aeger’ meaning ‘sick person’ which is in the 2nd declension- therefore the ending ‘is’ must be a dative (to/for) or ablative (by/with/from/in/on) plural. What does it agree with? Well, the only other word that is also in the dative/ablative plural is the adjective ‘mortalibus’ meaning ‘mortal’ so we know they must go together. How about the adjective ‘gratissima’? We can see by its ending that it is both feminine and singular, and could be in the nominative, the vocative or the ablative so we need to look elsewhere in the sentence to see what it goes with. It cannot be ‘dono’ or ‘divum’ – ‘dono’ is the ablative singular form of ‘donum’, a neuter, 2nd declension noun, whilst ‘divum’ is an ‘poetic’ genitive plural, a version of the genitive plural ‘deorum’. Therefore, go back to the noun before these (not ‘aegris’ as we have already figured that out) but ‘quies’ ‘rest’- can ‘gratissima’ agree with that? Yes! ‘Quies’ is a feminine 3rd declension noun, and here it is in its nominative form so we know that ‘gratissima’ can agree with it. Similarly, ‘prima’ has a feminine singular ending, so it also agrees with ‘quies’ in this sentence.