《宋史·列传·卷一百六十五》
遭母丧，服丧期满后，他应博学宏词科，直院庄夏推举他代替自己的官职。
丁母忧，服除，应博学宏词科，直院庄夏举自代。
Having suffered the loss of his mother, after observing the mourning period, he applied for the title of Most Learned and Distinguished, and Zhuang Xia of the Institute directly nominated him as his substitute for his official post.
<s>[INST] 将以下现代汉语文本转换为文言文: 遭母丧，服丧期满后，他应博学宏词科，直院庄夏推举他代替自己的官职。 [/INST] 丁母忧，服除，应博学宏词科，直院庄夏举自代。</s>
将以下现代汉语文本转换为文言文: 遭母丧，服丧期满后，他应博学宏词科，直院庄夏推举他代替自己的官职。
user
丁母忧，服除，应博学宏词科，直院庄夏举自代。
assistant