Restoring ancient manuscripts