《淮南子·汜论训》
当夏朝将要灭亡的时候，朝中的太史令终古就事先投奔了商汤，三年后夏桀果然灭亡；殷朝将要破败的时候，朝中的太史令向艺事先就归顺了周文王，一年之内殷纣王果真灭亡。
夫夏之将亡，太史令终古先奔于商，三年而桀乃亡。殷之将败也，太史令向艺先归文王，期年而纣乃亡。
Before the Xia Dynasty was about to perish, the Imperial Astronomer, Zhonggu, had already cast his lot with Tang of Shang; three years later, Xia Jie was overthrown as expected; when the Yin Dynasty was about to collapse, the Imperial Astronomer, Xiang Yi, had already pledged allegiance to King Wen of Zhou; within a year, King Zhou of Yin was overthrown as expected.
<s>[INST] Convert the following English text into Classical Chinese: Before the Xia Dynasty was about to perish, the Imperial Astronomer, Zhonggu, had already cast his lot with Tang of Shang; three years later, Xia Jie was overthrown as expected; when the Yin Dynasty was about to collapse, the Imperial Astronomer, Xiang Yi, had already pledged allegiance to King Wen of Zhou; within a year, King Zhou of Yin was overthrown as expected. [/INST] 夫夏之将亡，太史令终古先奔于商，三年而桀乃亡。殷之将败也，太史令向艺先归文王，期年而纣乃亡。</s>
Convert the following English text into Classical Chinese: Before the Xia Dynasty was about to perish, the Imperial Astronomer, Zhonggu, had already cast his lot with Tang of Shang; three years later, Xia Jie was overthrown as expected; when the Yin Dynasty was about to collapse, the Imperial Astronomer, Xiang Yi, had already pledged allegiance to King Wen of Zhou; within a year, King Zhou of Yin was overthrown as expected.
user
夫夏之将亡，太史令终古先奔于商，三年而桀乃亡。殷之将败也，太史令向艺先归文王，期年而纣乃亡。
assistant