Owner sells apartment with unpaid duty

The situation with the apartment received as an inheritance. After the entry into the law, the new owner sells it. But before the sale, the non-owner did not pay the fee, which was charged when assessing the apartment upon entering into inheritance rights. Do I need to pay it and who should do it: the seller or the new owner-buyer?