Solve problem 26 using Lua.