Solve problems 52,55,62 using Lua.