Solve problem 89 using Lua.