Distant encounters between disk galaxies and the origin of S 0 spirals