local random_char_string = function(arr, length) local result = "" for i = 1, length do result = result .. arr[math.random(#arr)] end return result end local yoba = function(atoms, n) local str = "" for i = n, 0, -1 do str = str .. string.rep(" ", i) .. random_char_string(atoms, (n - i) * 2 + 1) .. "\n" end return str end local n = tonumber(io.read()) if not n then n = 10 end local atoms = {"+", ".", "*", "~", "^", "o"} print(yoba(atoms, n))