-- your code goes here
a = {{1,2,3,4,},
{5,6,7,8,},
{9,10,11,12},
{13,14,15,16}}
bottom = {}
top = {}
for i, v in ipairs(a) do
for j, w in ipairs(v) do
if(i > j) then
table.insert(bottom, w)
else if(i < j) then
table.insert(top, w)
end
end
end
end
print("Top:")
for i=1, #top do
print(top[i])
end
print("Bottom:")
for i = 1, #bottom do
print(bottom[i])
end
LS0geW91ciBjb2RlIGdvZXMgaGVyZQoKYSA9IHt7MSwyLDMsNCx9LAogICAgIHs1LDYsNyw4LH0sCiAgICAgezksMTAsMTEsMTJ9LAogICAgIHsxMywxNCwxNSwxNn19CiAgICAgCmJvdHRvbSA9IHt9CnRvcCA9IHt9Cgpmb3IgaSwgdiBpbiBpcGFpcnMoYSkgZG8KCWZvciBqLCB3IGluIGlwYWlycyh2KSBkbwoJCWlmKGkgPiBqKSB0aGVuCgkJCXRhYmxlLmluc2VydChib3R0b20sIHcpCgkJZWxzZSBpZihpIDwgaikgdGhlbgoJCQl0YWJsZS5pbnNlcnQodG9wLCB3KQoJCWVuZAoJZW5kCmVuZAplbmQKCnByaW50KCJUb3A6IikKZm9yIGk9MSwgI3RvcCBkbwoJcHJpbnQodG9wW2ldKQplbmQKCnByaW50KCJCb3R0b206IikKZm9yIGkgPSAxLCAjYm90dG9tIGRvCglwcmludChib3R0b21baV0pCmVuZA==