Input (grade 7): There, they were mistaken for merchants by a royal official.
Output (grade 6): There, a royal official mistook them for merchants.