Solve problem 188 using Lua.