Input (grade 10): Threatened with invasion, he gave a promise to be the vassal of the sultan and gave up his two younger sons as hostages so that he would keep his promise.
Output (grade 8): He gave a promise to be the vassal of the Sultan and gave up his two younger sons as hostages so that he would keep his promise.