In Polish, the choice of ending depends on case, number and gender. There are three genders in the singular: masculine, feminine, neuter.
There are only two genders in the plural: one gender for male personal names, another for all other nouns.