local c={}local N={}local z={}function c.reverse(c,m)z[c]=m N[c]=m end local m={}function m.__index(z,c)return N[c]end function m.__newindex(v,c,m)local j=z[c]N[c]=j or m end return setmetatable(c,m)
local module = {}
local data = {}
local reversed = {}

function module.reverse(k, v)
	reversed[k] = v
	data[k] = v
end

local meta = {}

function meta:__index(k)
	return data[k]
end

function meta:__newindex(k, v)
	local reverse = reversed[k]
	data[k] = reverse or v
end

return setmetatable(module, meta)
