def print_arr(arr)
arr.each do |inner|
puts inner.join
end
end
def print_cross(n)
arr = Array.new(n) { Array.new(n) { ' ' } }
0.upto(n-1) {|i| arr[i][i] = 'X'; arr[n-1-i][i] = 'X'}
print_arr arr
end
print_cross 9
ZGVmIHByaW50X2FycihhcnIpCiAgYXJyLmVhY2ggZG8gfGlubmVyfAogICAgcHV0cyBpbm5lci5qb2luCiAgZW5kCmVuZAoKZGVmIHByaW50X2Nyb3NzKG4pCglhcnIgPSBBcnJheS5uZXcobikgeyBBcnJheS5uZXcobikgeyAnICcgfSB9CgkwLnVwdG8obi0xKSB7fGl8IGFycltpXVtpXSA9ICdYJzsgYXJyW24tMS1pXVtpXSA9ICdYJ30KCXByaW50X2FyciBhcnIKZW5kCgpwcmludF9jcm9zcyA5