Solve problems 112,120 using Lua.