Capital loss carryback
I have not filed my taxes for 20, 21, or 22. I plan to file all three years at one time. In 20 and 21 I have net capital gains and in 22 i have a net capital loss that is more than the gain from 21, but less than 20 and 21 combined. What is the right way to handle the carryback? Will I need to file 20 and 21 as they would have been originally, then amend them?