#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <cfloat>
#include <ctime>
#include <cassert>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>
#include <numeric>
#include <list>
#include <iomanip>
   
using namespace std;
   

#define rep(i, n) for (int i = 0; i < (int)n; ++i)
#define foreach(it, c) for (__typeof__((c).begin()) it=(c).begin(); it != (c).end(); ++it)
#define rforeach(it, c) for (__typeof__((c).rbegin()) it=(c).rbegin(); it != (c).rend(); ++it)
#define all(c) (c).begin(), (c).end()
#define rall(c) (c).rbegin(), (c).rend()
#define CL(arr, val) memset(arr, val, sizeof(arr))
#define COPY(dest, src) memcpy(dest, src, sizeof(dest))
   
template <class T> void max_swap(T& a, const T& b) { a = max(a, b); }
template <class T> void min_swap(T& a, const T& b) { a = min(a, b); }

template <class T> void sort(vector<T>& c) { sort(c.begin(), c.end()); }
template <class T> void uniq(vector<T>& c) { sort(c.begin(), c.end()); c.erase(unique(c.begin(), c.end()), c.end()); }

template <class T> string to_s(const T& a) { ostringstream os; os << a; return os.str(); }
template <class T> T to_T(const string& s) { istringstream is(s); T res; is >> res; return res; }
  
bool valid(int x, int y, int w, int h) { return 0 <= x && x < w && 0 <= y && y < h; }

template <class T, class U> ostream& operator<<(ostream& os, pair<T, U>& p) { os << "( " << p.first << ", " << p.second << " )"; return os; }
  
template <class T> void print(T a, int n, const string& deli = " ", int br = 1) { for (int i = 0; i < n; ++i) { cout << a[i]; if (i + 1 != n) cout << deli; } while (br--) cout << endl; }
template <class T> void print(const T& c, const string& deli = " ", int br = 1) { foreach (it, c) { cout << *it; if (++it != c.end()) cout << deli;--it; } while (br--) cout << endl; }
template <class T> void print2d(T a, int w, int h, int width = -1, int br = 1) { for (int i = 0; i < h; ++i) { for (int j = 0; j < w; ++j) {    if (width != -1) cout.width(width); cout << a[i][j] << ' '; } cout << endl; } while (br--) cout << endl; }
   
template <class T> void input(T& a, int n) { for (int i = 0; i < n; ++i) cin >> a[i]; }
template <class T> void input(T* a, int n) { for (int i = 0; i < n; ++i) cin >> a[i]; }
template <class T> void input2d(T& a, int w, int h) { for (int i = 0; i < h; ++i) for (int j = 0; j < w; ++j) cin >> a[i][j]; }

void fast_io() { cin.tie(0); ios::sync_with_stdio(false); }
#define trace(x) (cout << #x << ": " << (x) << endl)

typedef long long ll;
typedef pair<int, int> pint;

const int dx[] = { 0, 1, 0, -1 };
const int dy[] = { 1, 0, -1, 0 };
  
const double PI = acos(-1.0);
const int mod = 1000000007;



void p(int e)
{
    for (int y = 0; y < 5; ++y)
    {
        for (int x = 0; x < 5; ++x)
            printf("%d ", e >> (5 * y + x) & 1);
        puts("");
    }
    puts("");
}


bool enemy(int e, int x, int y)
{
    return e >> (5 * y + x) & 1;
}
int xor_mask[5][5][5][5];
int cost[1 << 20]; /// 4 rows * 5 cols
void pre()
{
    // myon mask
    for (int y1 = 0; y1 < 5; ++y1)
    {
        for (int x1 = 0; x1 < 5; ++x1)
        {
            for (int y2 = y1; y2 < 5; ++y2)
            {
                for (int x2 = x1; x2 < 5; ++x2)
                {
                    int mask = 0;
                    for (int y = y1; y <= y2; ++y)
                        for (int x = x1; x <= x2; ++x)
                            mask |= 1 << (5 * y + x);
                    xor_mask[y1][x1][y2][x2] = mask;
                }
            }
        }
    }

    // bfs
    CL(cost, -1);
    queue<int> q;
    cost[0] = 0;
    q.push(0);
    while (!q.empty())
    {
        int cur = q.front();
        int ncost = cost[cur] + 1;
        q.pop();

        for (int y1 = 0; y1 < 4; ++y1)
        {
            for (int x1 = 0; x1 < 5; ++x1)
            {
                for (int y2 = y1; y2 < 4; ++y2)
                {
                    for (int x2 = x1; x2 < 5; ++x2)
                    {
                        int next = cur ^ xor_mask[y1][x1][y2][x2];
                        if (cost[next] == -1)
                        {
                            cost[next] = ncost;
                            q.push(next);
                        }
                    }
                }
            }
        }
    }
}

int res;
bool used_left[5], used_right[5];
void dfs(int e, int c, int depth)
{
    if (depth >= 5 || c >= res)
        return;
    else if (e < (1 << 20))
    {
        min_swap(res, c + cost[e]);
        return;
    }

    for (int left = 0; left < 5; ++left)
    {
        if (!used_left[left])
        {
            used_left[left] = true;

            for (int right = left; right < 5; ++right)
            {
                if (!used_right[right])
                {
                    used_right[right] = true;

                    for (int y = 0; y < 5; ++y)
                        dfs(e ^ xor_mask[y][left][4][right], c + 1, depth + 1);

                    used_right[right] = false;
                }
            }

            used_left[left] = false;
        }
    }

    dfs(e, c, depth + 1);
}
int main()
{
    fast_io();
    pre();

    string myon[33];
    myon[0] = "";
    for (int i = 0; i < 30; ++i)
        myon[i + 1] = myon[i] + "myon";

    int n;
    while (cin >> n, n)
    {
        int e = 0;
        for (int y = 0; y < n; ++y)
        {
            for (int x = 0; x < n; ++x)
            {
                int t;
                cin >> t;
                e |= t << (y * 5 + x);
            }
        }

        // shift upward if no enemies in 1st row
        const int first_row = ((1 << 5) - 1);
        while (!(e & first_row) && e)
            e >>= 5;

        res = 25;
        dfs(e, 0, 0);
        cout << myon[res] << endl;
    }
}

Measured memory_bytes: 7800