Model of heterochromatin formation