Solve problem 56 using Lua.