local n, k = io.read("*n", "*n", "*l") for i = 1, n do local s = io.read() for row = 1, k do local t = {} for col = 1, n do local v = s:sub(col, col) table.insert(t, v:rep(k)) end print(table.concat(t)) end end