Implement #put and #get on both ends