In Polish Past Tense, every single verb is gendered according to the gender of the subject of the sentence. So if "I" am the subject of the sentence, the ending will depend on my own gender. I am a guy, so I will say "ugotowałEm". My girlfriend will say "ugotowałAm".