#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;

int n, a[N], kong4_wei4_begin, num;

void f()
{
	for (int i = 1; i <= n - 1; i++)
	{
		if (a[i] == 1 and a[i + 1] == 2 and i <= ((n - 2) / 2))
		{
			a[kong4_wei4_begin] = a[i], a[kong4_wei4_begin + 1] = a[i + 1];
			a[i] = a[i + 1] = 0;
			for (int i = 1; i <= n; i++)
			{
				if (a[i] == 1)
					cout << "o";
				else if (a[i] == 2)
					cout << "*";
				else
					cout << "_";
			}
			cout << endl << ++num << endl;
			f();
			return;
		}
	}
	for (int i = 2; i <= n - 1; i++)
	{
		if (a[i] == 2 and a[i - 1] == 2 and a[i + 1] == 1)
		{
			a[kong4_wei4_begin] = a[i], a[kong4_wei4_begin + 1] = a[i - 1];
			a[i] = a[i - 1] = 0;
			for (int i = 1; i <= n; i++)
			{
				if (a[i] == 1)
					cout << "o";
				else if (a[i] == 2)
					cout << "*";
				else
					cout << "_";
			}
			cout << endl << ++num << endl;
			f();
			return;
		}
	}
}

int main()
{
	memset(a, -1, sizeof(a));
	cin >> n;
	n *= 2;
	for (int i = 1; i <= (n / 2); i++)
		a[i] = 1, a[i + (n / 2)] = 2; // 白1 黑2
	kong4_wei4_begin = n + 1, a[n + 1] = a[n + 2] = 0, n += 2;
	f();
	
	return 0;
}