### constants

MAX_INT = 1 << 30

### subroutines

def make_mask(x0, x1, y0, y1)
  hbits = ((1 << (x1 - x0 + 1)) - 1) << x0
  bits = 0
  for y in (y0..y1)
    bits |= (hbits << (y * $n))
  end
  bits
end

def min_dist(bits)
  return $dists[bits] if ! $dists[bits].nil?

  id = 0
  while ((bits >> id) & 1) == 0
    id += 1
  end

  x0 = id % $n
  y0 = id / $n
  md = MAX_INT

  ($n - 1).downto(y0) do |y1|
    ($n - 1).downto(x0) do |x1|
      bits0 = bits ^ $nbrs[x0 * $n3 + x1 * $n2 + y0 * $n + y1]
      d = min_dist(bits0) + 1
      md = d if md > d
    end
  end

  $dists[bits] = md
end

### main

loop do
  $n = gets.to_i
  break if $n == 0

  $n2 = $n * $n
  $n3 = $n2 * $n
  
  st = 0

  for y in (0...$n)
    hl = gets.split.map(&:to_i)
    for x in (0...$n)
      st |= (hl[x] << (x + y * $n))
    end
  end
  #p st.to_s(2)

  $nbrs = []

  for x0 in (0...$n)
    for x1 in (x0...$n)
      for y0 in (0...$n)
        for y1 in (y0...$n)
          id = x0 * $n3 + x1 * $n2 + y0 * $n + y1
          $nbrs[id] = make_mask(x0, x1, y0, y1)
        end
      end
    end
  end
  #p $nbrs; exit

  $dists = {}
  $dists[0] = 0

  md = min_dist(st)
  puts (['myon'] * md).join('')
end