local N do local function u(N,u)error(("\114\101\097\100\105\110\103 \110\111\110\101\120\105\115\116\101\110\116 \101\108\101\109\101\110\116 \037\113 \102\114\111\109 \108\111\099\107\101\100 \116\097\098\108\101"):format(tostring(u)),2)end local function v(N,u)error(("\119\114\105\116\105\110\103 \107\101\121 \037\113 \116\111 \108\111\099\107\101\100 \116\097\098\108\101"):format(tostring(u)),2)end local L={__index=u,__newindex=v}function N(N)setmetatable(N,L)return setmetatable({},{__index=N,__newindex=v,__metatable="\084\104\101 \109\101\116\097\116\097\098\108\101 \105\115 \108\111\099\107\101\100"})end end

local tableLock do
	local function invalidRead(_, k)
		error(("reading nonexistent element %q from locked table"):format(tostring(k)), 2)
	end

	local function invalidWrite(_, k)
		error(("writing key %q to locked table"):format(tostring(k)), 2)
	end

	local RW_LOCK = {
		__index = invalidRead,
		__newindex = invalidWrite,
	}

	function tableLock(tbl)
		setmetatable(tbl, RW_LOCK)

		return setmetatable(
			{},
			{
				__index = tbl,
				__newindex = invalidWrite,
				__metatable = "The metatable is locked",
			}
		)
	end
end
