GoRelian problem solution in Lua