Solve problem 119 using Lua.