REBOL[]r: do input for x 1 r 1[c: copy""for y 1 r 1[c: append c either(x = 1 or(x = r)or(y = 1)or(y = r))[1][0]]print c]