By which of the following the Chinese government had restricted foreign trade to only three ports?
A. 1500s
B. 1800s
C. 1600s
D. 1700s