s="[[" t="" for a=1,io.read() do for b=1,io.read() do s=s..t..io.read() t=", " end t="], [" end print(s.."]]")