Solve problem 82 using Lua.