Salam alykioum maulana inshallah you are well . I have a question about what happens during the imam mahdis ruling and how does he dies and whats after his death

Inshallah Imam as will establish justice and peace in the world
Imam will be kill by the women and Imam Husain as will give him ghusl kafan and burry him and after that qayamat will come