Which animal lives male for one year and female year?

There is no animal that lives male for one year and female for another.

Sex in animals is determined by:

* Genetics: Most animals have a specific set of chromosomes that determine their sex. For example, in mammals, females have two X chromosomes (XX) and males have one X and one Y chromosome (XY).

* Environmental factors: Some species, like some reptiles, have sex determined by the temperature during egg incubation.

Individuals do not change their sex during their lifetime.

There are some hermaphroditic animals that can produce both sperm and eggs, but they don't switch back and forth.

It's possible you're thinking of a fictional creature or a misunderstanding of animal biology.