Until the mid-nineteenth century, Japan cut itself off from the outside world for 200 years.