Write/read tree