Given the task definition and input, reply with output. In this task, you are given a question. You have to answer the question based on your information.

What dynasty was founded by one of the prominent rulers of Afghanistan during the First Anglo-Afghan War, who had a dispute with former emir Shah Shujah hom they installed upon conquering Kabul in August 1839?
Barakzai dynasty