n = input()
x = map(int, raw_input().split())
x.sort()
# print x
pre = [0] * (sum(x)+1)
pre[x[0]] = 1
for i in range(1, n):
	for j in range(x[i-1]+1,x[i]):
		pre[j] = pre[x[i-1]]
	pre[x[i]] = pre[x[i-1]] + 1
# print pre
q = input()
m = [0] * q
for i in range(q): m[i] = input()
for i in m:
	# print 'i=', i, ',',
	if i > x[n-1]: print n
	else: print pre[i]


import bisect
n = input()
xi = sorted(map(int,raw_input().split()))
q = input()
for i in range(0,q):
    mi = input()
    print bisect.bisect(xi,mi,0,len(xi))


num_shops = input()
prices = sorted([int(num) for num in raw_input().split()])
q = input()

for i in xrange(q):
    # binary search prices
    low = 0
    high = num_shops-1
    val = input()
    ans = 0
    if val >= prices[num_shops-1]:
        print num_shops
    elif val < prices[0]:
        print 0
    else:
        while low <= high:
            if prices[high] <= val:
                ans = high
                break

            mid = (low+high)/2
            if prices[mid] <= val:
                low = mid
                high = high - 1
            elif prices[mid] > val:
                high = mid-1
        print ans+1


import bisect
n = int(input())
bottles = map(int, raw_input().split())
bottles = sorted(bottles)
q = int(input())
coins = []
for i in range(0, q):
    coins.append(int(input()))
for i in range(0, q):
    print bisect.bisect_right(bottles, coins[i])


import bisect

n = input()
prices = sorted([int(x) for x in raw_input().split(' ')])
num_days = int(input())
coins = []
for day in range(num_days):
	coins.append(int(input()))
for coin in coins:
	print(bisect.bisect_right(prices, coin))


obchodu = int(raw_input())

ceny_raw = raw_input().split()
ceny = []
for cena in ceny_raw:
    ceny.append(int(cena))

ceny = sorted(ceny)
ceny.append(100005)
ceny.append(100006)
ceny.append(100007)

ukazatel = 0
while(ceny[ukazatel] == ceny[ukazatel + 1]):
    ukazatel += 1

pocet_podniku = {}
for i in range(100001):
    # ukazatel + 1 == pocet_moznych podniku
    if i < (ceny[ukazatel]):
        pocet_podniku[i] = ukazatel
    else:
        ukazatel += 1
        while(ceny[ukazatel] == ceny[ukazatel + 1]):
            ukazatel += 1
        pocet_podniku[i] = ukazatel

dni = int(raw_input())
for i in range(dni):
    cena = int(raw_input())
    print pocet_podniku[cena]


obchodu = int(raw_input())

ceny_raw = raw_input().split()
ceny = []
for cena in ceny_raw:
    ceny.append(int(cena))

ceny = sorted(ceny)
ceny.append(100005)
ceny.append(100006)
ceny.append(100007)

ukazatel = 0

pocet_podniku = {}
for i in range(100001):
    # ukazatel + 1 == pocet_moznych podniku
    if i < (ceny[ukazatel]):
        pocet_podniku[i] = ukazatel
    else:
        while(ceny[ukazatel] == ceny[ukazatel + 1]):
            ukazatel += 1
        ukazatel += 1
        pocet_podniku[i] = ukazatel

dni = int(raw_input())
for i in range(dni):
    cena = int(raw_input())
    print pocet_podniku[cena]


obchodu = int(raw_input())

ceny_raw = raw_input().split()
ceny = []
for cena in ceny_raw:
    ceny.append(int(cena))

ceny = sorted(ceny)
ceny.append(100005)
ceny.append(100006)
ceny.append(100007)

ukazatel = 0

pocet_podniku = {}
for i in range(100001):
    # ukazatel + 1 == pocet_moznych podniku
    if i < (ceny[ukazatel]):
        pocet_podniku[i] = ukazatel
    else:
        while(ceny[ukazatel] == ceny[ukazatel + 1]):
            ukazatel += 1
        ukazatel += 1
        pocet_podniku[i] = ukazatel

dni = int(raw_input())
for i in range(dni):
    cena = int(raw_input())
    if cena > 100000:
        print obchodu
    else:
        print pocet_podniku[cena]


from sys  import stdin

#stdin = open("data.in", "r")

n = int(stdin.readline())

shops = map(int, stdin.readline().split())
freq = [0] * 100001
for it in xrange(n):
    freq[shops[it]] += 1
for it in xrange(2, 100001):
    freq[it] += freq[it - 1]

days = int(stdin.readline())
for day in xrange(days):
    q = int(stdin.readline())
    if q >= 100000:
        q = 100000
    print freq[q]


from sys  import stdin

#stdin = open("data.in", "r")

n = int(stdin.readline())

shops = map(int, stdin.readline().split())
freq = [0] * 100001
for it in xrange(n):
    freq[shops[it]] += 1
for it in xrange(2, 100001):
    freq[it] += freq[it - 1]

days = int(stdin.readline())
for day in xrange(days):
    print freq[int(stdin.readline())]


n = int(raw_input())
A = map(int, raw_input().split())
q = int(raw_input())
Q = [0] * q
for i in xrange(q):
    Q[i] = int(raw_input())
Q = [(x,i) for i,x in enumerate(Q,1)]
A.sort()
Q.sort()
c = 0
A.append(10**12)
Res = {}
for x,i in Q:
    while x>= A[c]: c+=1
    Res[i] = c

for i in xrange(1,q+1):
    print Res[i]


def binsrch(arr,low,hi,x):
    global bestans

    if low<=hi:
        if hi-low<5:
            for i in range(low,hi+1):
                if arr[i]<=x:
                    bestans=i

        else:
            mid=(low+hi)/2
            if arr[mid]<=x:
                bestans=mid
                low=mid+1
            else:
                hi=mid-1
            binsrch(arr,low,hi,x)

n=input()
L=list(raw_input().split())
L=[int(i) for i in L]
L.sort()
n2=input()
for i in range(0,n2):
    x=input()
    bestans=-1
    binsrch(L,0,n-1,x)
    print bestans+1


q=int(raw_input())
s=sorted(map(int,raw_input().split()))
d=int(raw_input())
c=[]
for i in range(d):
    day=int(raw_input())
    l=0
    h=len(s)-1
    if day<s[0]:
        c.append(0)
        continue
    if day>s[-1]:
        c.append(q)
        continue
    while(l<h):
        #print l,h
        m=l+((h-l+1)/2)
        if s[m]>day:
            h=m-1
        elif s[m]<=day:
            l=m
    c.append(l+1)
for i in c:
    print i


q=int(raw_input())
s=sorted(map(int,raw_input().split()))
d=int(raw_input())
c=[]
for i in range(d):
    day=int(raw_input())
    l=0
    h=len(s)-1
    if day<s[0] or day>s[-1]:
        c.append(0)
        continue
    while(l<h):
        #print l,h
        m=l+((h-l+1)/2)
        if s[m]>day:
            h=m-1
        elif s[m]<=day:
            l=m
    c.append(l+1)
for i in c:
    print i


from bisect import bisect_left as bl
n = int(raw_input().strip())
A = map(int, raw_input().split(" "))
Q = int(raw_input().strip())
A.sort()
for q in range(Q):
	N = int(raw_input().strip())
	index = bl(A, N + 1)
	print(index)


l=lambda:map(int,raw_input().split())
n=int(raw_input())
p=l()
p=sorted(p)
m=int(raw_input())
q=[]
for i in range(m):
    q.append(int(raw_input()))

def bs(p,n,x):
    l=0;r=n-1
    while l<=r:
        mid=l+(r-l)/2
        if x==p[mid]:
            return mid+1
        elif x>p[mid]:
            l=mid+1
        else:
            r=mid-1
    return l

for i in range(m):
    if q[i]<p[0]:
        print 0
    else:
        print bs(p,n,q[i])


l=lambda:map(int,raw_input().split())
n=int(raw_input())
p=l()
p=sorted(p)
m=int(raw_input())
q=[]
for i in range(m):
    q.append(int(raw_input()))
def bs(p,n,x):
    l=0;r=n-1
    while l<=r:
        mid=l+(r-l)/2
        if x==p[mid]:
            return mid
        elif x>p[mid]:
            l=mid+1
        else:
            r=mid-1
    return l

for i in range(m):
    if q[i]<p[0]:
        print 0
    else:
        print bs(p,n,q[i])


#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define ull long long int
#define pb push_back
#define vi vector<int>
#define vll vector<ll>
#define vs vector<string>
#define vull vector<ull>
#define all(v) v.begin(),v.end()
#define mp make_pair
// __builtin_popcount(int x)
// __builtin_popcountll(ll x)
//min_arr(v) min_element(v,v+n);
#define dulo 1000000007
ull power(ull x, ull y)
{
    ull temp;
    if( y == 0)
       return 1;
    temp = power(x, y/2);
    if (y%2 == 0)
        return (temp*temp);
    else
    {
        if(y > 0)
            return (x*temp*temp);
        else
            return (temp*temp)/x;
    }
}
long long int mul_inv(long long int n,long long int p,long long int m){
	if(p==1){
		return n;
	}
	else if(p%2==0){
		long long int t= mul_inv(n,p/2,m);
		return ((t)*(t))%m;
	}
	else{
		long long int t= mul_inv(n,p/2,m);
		return ((((n%m)*t)%m)*t)%m;
	}
}
int main(){

	/*freopen("cc.in","r",stdin);
    freopen("cc.out","w",stdout);
    */
	/*
	float ans;
	std::cout << std::fixed;
    std::cout << std::setprecision(9);
    std::cout << ans;
	*/
	int k;
	cin>>k;
	if(k==1){
		cout<<"++"<<endl;
		cout<<"+-"<<endl;
	}
	else if(k==2){
		cout<<"++**"<<endl;
		cout<<"+*+*"<<endl;
		cout<<"++++"<<endl;
		cout<<"+**+"<<endl;
	}
	else{
		vector<string>v;
		v.pb("++**");
		v.pb("+*+*");
		v.pb("++++");
		v.pb("+**+");
		for(int i=3;i<=k;i++){
			vector<string>temp=v;
			for(int j=0;j<v.size();j++){
				v[j]+=v[j];
			}
			int loop=v.size();
			for(int j=0;j<loop;j++){
				string s=temp[j];
				int len=s.length();
				for(int q=0;q<len;q++){
					if(s[q]=='+'){
						s+="*";
					}
					else{
						s+="+";
					}
				}
				v.pb(s);
			}
		}
		for(int i=0;i<v.size();i++){
			cout<<v[i]<<endl;
		}
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define ull long long int
#define pb push_back
#define vi vector<int>
#define vll vector<ll>
#define vs vector<string>
#define vull vector<ull>
#define all(v) v.begin(),v.end()
#define mp make_pair
// __builtin_popcount(int x)
// __builtin_popcountll(ll x)
//min_arr(v) min_element(v,v+n);
#define dulo 1000000007
ull power(ull x, ull y)
{
    ull temp;
    if( y == 0)
       return 1;
    temp = power(x, y/2);
    if (y%2 == 0)
        return (temp*temp);
    else
    {
        if(y > 0)
            return (x*temp*temp);
        else
            return (temp*temp)/x;
    }
}
long long int mul_inv(long long int n,long long int p,long long int m){
	if(p==1){
		return n;
	}
	else if(p%2==0){
		long long int t= mul_inv(n,p/2,m);
		return ((t)*(t))%m;
	}
	else{
		long long int t= mul_inv(n,p/2,m);
		return ((((n%m)*t)%m)*t)%m;
	}
}
int main(){

	/*freopen("cc.in","r",stdin);
    freopen("cc.out","w",stdout);
    */
	/*
	float ans;
	std::cout << std::fixed;
    std::cout << std::setprecision(9);
    std::cout << ans;
	*/
	int k;
	cin>>k;
	if(k==1){
		cout<<"++"<<endl;
		cout<<"+*"<<endl;
	}
	else if(k==0){
		cout<<"+";
	}
	else if(k==2){
		cout<<"++**"<<endl;
		cout<<"+*+*"<<endl;
		cout<<"++++"<<endl;
		cout<<"+**+"<<endl;
	}
	else{
		vector<string>v;
		v.pb("++**");
		v.pb("+*+*");
		v.pb("++++");
		v.pb("+**+");
		for(int i=3;i<=k;i++){
			vector<string>temp=v;
			for(int j=0;j<v.size();j++){
				v[j]+=v[j];
			}
			int loop=v.size();
			for(int j=0;j<loop;j++){
				string s=temp[j];
				int len=s.length();
				for(int q=0;q<len;q++){
					if(s[q]=='+'){
						s+="*";
					}
					else{
						s+="+";
					}
				}
				v.pb(s);
			}
		}
		for(int i=0;i<v.size();i++){
			cout<<v[i]<<endl;
		}
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define ull long long int
#define pb push_back
#define vi vector<int>
#define vll vector<ll>
#define vs vector<string>
#define vull vector<ull>
#define all(v) v.begin(),v.end()
#define mp make_pair
// __builtin_popcount(int x)
// __builtin_popcountll(ll x)
//min_arr(v) min_element(v,v+n);
#define dulo 1000000007
ull power(ull x, ull y)
{
    ull temp;
    if( y == 0)
       return 1;
    temp = power(x, y/2);
    if (y%2 == 0)
        return (temp*temp);
    else
    {
        if(y > 0)
            return (x*temp*temp);
        else
            return (temp*temp)/x;
    }
}
long long int mul_inv(long long int n,long long int p,long long int m){
	if(p==1){
		return n;
	}
	else if(p%2==0){
		long long int t= mul_inv(n,p/2,m);
		return ((t)*(t))%m;
	}
	else{
		long long int t= mul_inv(n,p/2,m);
		return ((((n%m)*t)%m)*t)%m;
	}
}
int main(){

	/*freopen("cc.in","r",stdin);
    freopen("cc.out","w",stdout);
    */
	/*
	float ans;
	std::cout << std::fixed;
    std::cout << std::setprecision(9);
    std::cout << ans;
	*/
	int k;
	cin>>k;
	if(k==1){
		cout<<"++"<<endl;
		cout<<"+*"<<endl;
	}
	else if(k==2){
		cout<<"++**"<<endl;
		cout<<"+*+*"<<endl;
		cout<<"++++"<<endl;
		cout<<"+**+"<<endl;
	}
	else{
		vector<string>v;
		v.pb("++**");
		v.pb("+*+*");
		v.pb("++++");
		v.pb("+**+");
		for(int i=3;i<=k;i++){
			vector<string>temp=v;
			for(int j=0;j<v.size();j++){
				v[j]+=v[j];
			}
			int loop=v.size();
			for(int j=0;j<loop;j++){
				string s=temp[j];
				int len=s.length();
				for(int q=0;q<len;q++){
					if(s[q]=='+'){
						s+="*";
					}
					else{
						s+="+";
					}
				}
				v.pb(s);
			}
		}
		for(int i=0;i<v.size();i++){
			cout<<v[i]<<endl;
		}
	}
	return 0;
}


#include <iostream>
#include <string>
#include <math.h>
using namespace std;

string convtobin(int a)
{
	string s = "";
	// cout<<to_/string(0)<<endl;
	while(a>=2)
	{
		s = std::to_string(a%2) + s;
		a = a/2;
	}
	s = to_string(a) + s;
	return s;
}

string increaselength(string j,int k)
{
	int counter = 0;
	while(counter < k-j.length())
	{
		j = "0" + j;
	}
	return j;
}
int getidigit(int i, string j)
{

	if(i< j.length() && j[i] == '1')
	{
		return 1;
	}
	return 0;
}

int main()
{
	int inp;
	cin >> inp;
	int size = pow(2,inp);
	if(inp == 0)
	{
		cout<< "+";
	}
	else
	{
	string* bin = new string[size];
	for(int i=0;i<size;i++)
	{
		bin[i] = increaselength(convtobin(i),inp);
		// cout<< bin[i]<<"\n";
	}
	int** m = new int*[size];
	for(int i=0;i<size;i++)
	{
		m[i] = new int[size];
	}
	for(int i=0;i<size;i++)
	{
		for(int j=0;j<size;j++)
		{
			m[i][j] = 1;
			for(int k=0;k<inp;k++)
			{
				m[i][j] *= pow(-1,getidigit(k,bin[i])*getidigit(inp-1-k,bin[j]));
			}
		}
	}
	for(int i=0;i<size;i++)
	{
		for(int j=0;j<size;j++)
		{
			if(m[i][j] == 1)
			{
				cout<<"+";
			}
			else
			{
				cout << "*";
			}
			// cout<<m[i][j]<<"/ ";
		}
		cout <<"\n";
	}
}
	// cout<< getidigit(2,convtobin(1),inp)<<"\n";
	return 0;
}


#include <iostream>
#include <string>
#include <math.h>
using namespace std;

string convtobin(int a)
{
	string s = "";
	// cout<<to_/string(0)<<endl;
	while(a>=2)
	{
		s = std::to_string(a%2) + s;
		a = a/2;
	}
	s = to_string(a) + s;
	return s;
}

int getidigit(int i, string j, int k)
{
	int counter = 0;
	while(counter < k-j.length())
	{
		j = "0" + j;
	}
	if(i< j.length() && j[i] == '1')
	{
		return 1;
	}
	return 0;
}

int main()
{
	int inp;
	cin >> inp;
	int size = pow(2,inp);
	int** m = new int*[size];
	for(int i=0;i<size;i++)
	{
		m[i] = new int[size];
	}
	for(int i=0;i<size;i++)
	{
		for(int j=0;j<size;j++)
		{
			m[i][j] = 1;
			for(int k=0;k<inp;k++)
			{
				m[i][j] *= pow(-1,getidigit(k,convtobin(i),inp)*getidigit(inp-1-k,convtobin(j),inp));
			}
		}
	}
	for(int i=0;i<size;i++)
	{
		for(int j=0;j<size;j++)
		{
			if(m[i][j] == 1)
			{
				cout<<"+";
			}
			else
			{
				cout << "*";
			}
			// cout<<m[i][j]<<"/ ";
		}
		cout <<"\n";
	}
	// cout<< getidigit(2,convtobin(1),inp)<<"\n";
	return 0;
}


#include <iostream>
#include <math.h>
using namespace std;

int main()
{
	int k;
	// Take input
	cin >> k;
	int size = pow(2,k);
	int** m = new int*[size];
	for(int i=0;i<size;i++)
	{
		m[i] = new int[size];
	}
	for(int i=0;i<size/2;i++)
	{
		int interval = size/pow(2,i);
		int power = 0;
		int counter = 0;
		for(int j=0;j<size;j++)
		{
			if(counter <interval)
			{
				m[i][j] = pow(-1,power);
				counter ++;
			}
			if(counter == interval)
			{
				counter = 0;
				power++;
			}
		}
	}
	for(int i=0;i<size/2;i++)
	{
		for(int j=0;j<size;j++)
		{
			m[size-i-1][j] = (-1)*m[i][j];
		}
	}
	for(int i=0;i<size;i++)
	{
		for(int j=0;j<size;j++)
		{
			if(m[i][j] == 1)
			{
				cout << "+";
			}
			else
			{
				cout << "*";
			}
			// cout<<m[i][j]<<" ";
		}
		cout << "\n";
	}
	return 0;

}


#include <iostream>
#include <string>
#include <math.h>
using namespace std;

string convtobin(int a)
{
	string s = "";
	// cout<<to_/string(0)<<endl;
	while(a>=2)
	{
		s = std::to_string(a%2) + s;
		a = a/2;
	}
	s = to_string(a) + s;
	return s;
}

string increaselength(string j,int k)
{
	int counter = 0;
	while(counter < k-j.length())
	{
		j = "0" + j;
	}
	return j;
}
int getidigit(int i, string j)
{

	if(i< j.length() && j[i] == '1')
	{
		return 1;
	}
	return 0;
}

int main()
{
	int inp;
	cin >> inp;
	int size = pow(2,inp);

	string* bin = new string[size];
	for(int i=0;i<size;i++)
	{
		bin[i] = increaselength(convtobin(i),inp);
		// cout<< bin[i]<<"\n";
	}
	int** m = new int*[size];
	for(int i=0;i<size;i++)
	{
		m[i] = new int[size];
	}
	for(int i=0;i<size;i++)
	{
		for(int j=0;j<size;j++)
		{
			m[i][j] = 1;
			for(int k=0;k<inp;k++)
			{
				m[i][j] *= pow(-1,getidigit(k,bin[i])*getidigit(inp-1-k,bin[j]));
			}
		}
	}
	for(int i=0;i<size;i++)
	{
		for(int j=0;j<size;j++)
		{
			if(m[i][j] == 1)
			{
				cout<<"+";
			}
			else
			{
				cout << "*";
			}
			// cout<<m[i][j]<<"/ ";
		}
		cout <<"\n";
	}
	// cout<< getidigit(2,convtobin(1),inp)<<"\n";
	return 0;
}


#include <bits/stdc++.h>

#define pb push_back
#define mp make_pair

using namespace std;

string inv(string s) {
	string ans;
	for (int i = 0; i < (int)s.size(); i++) {
		if (s[i] == '*') {
			ans.pb('+');
		}
		else {
			ans.pb('*');
		}
	}
	return ans;
}

int main () {
	//ifstream cin("input.txt");
	//ofstream cout("output.txt");
	ios_base::sync_with_stdio(0);

	int n;
	cin >> n;
	if (n == 0) {
		cout << '*';
		return 0;
	}
	vector <string> prev;
	prev.pb("++");
	prev.pb("+*");
	vector <string> ans;
	for (int i = 2; i <= n; i++) {
		ans.resize(2 * (int)prev.size());
		for (int j = 0; j < (int)prev.size() - 1; j++) {
			ans[j] = prev[j] + prev[j];
			ans[j + (int)prev.size()] = prev[j] + prev[j];
		}
		ans[(int)prev.size() - 1] = prev.back() + prev.back();
		ans[(int)ans.size() - 1] = prev.back() + inv(prev.back());
		prev = ans;
	}
	for (int i = 0; i < (int)prev.size(); i++) {
		for (int j = 0; j < (int)prev.size(); j++) {
			cout << prev[i][j];
		}
		cout << endl;
	}

	return 0;
}


#include <bits/stdc++.h>

using namespace std;

void swich(char &c) {
	if (c == '+') {
		c = '*';
	}
	else {
		c = '+';
	}
}

void nextpl(vector <char> &pl) {
	for (int i = 0; i < (int)pl.size(); i++) {
		if (pl[i] == '+') {
			if (i < (int)pl.size() - 1) {
				swap(pl[i], pl[i + 1]);
			}
			return;
		}
	}
}

void nextmi(vector <char> &mi) {
	for (int i = 0; i < (int)mi.size(); i++) {
		if (mi[i] == '*') {
			if (i < (int)mi.size() - 1) {
				swap(mi[i], mi[i + 1]);
			}
			return;
		}
	}
}

int main () {
	//ifstream cin("input.txt");
	//ofstream cout("output.txt");
	ios_base::sync_with_stdio(0);

	int n;
	cin >> n;
	if (n == 0) {
		cout << '*';
		return 0;
	}
	else if (n == 1) {
		cout << "*+" << endl << "+*";
		return 0;
	}
	vector <vector <char> > ans(1 << n, vector <char> (1 << n));
	int a = 1 << n;
	int t = a;
	for (int i = 0; i < a / 2; i++) {
		int j = 0, s = 1;
		char c = '+';
		while (true) {
			ans[i][j] = c;
			j++;
			s++;
			if (j == a) break;
			if (s >= t) {
				s = 1;
				swich(c);
			}
		}
		t /= 2;
	}
	for (int i = a / 2 + 1; i < a; i++) {
		ans[i][0] = '+';
	}
	vector <int> sums(a, 0);
	for (int j = 1; j < a; j++) {
		int sum = 0;
		for (int i = 0; i < a / 2; i++) {
			if (ans[i][j] == '+') {
				sum++;
			}
			else {
				sum--;
			}
		}
		sums[j] = sum;
	}
	int x = a / 4;
	vector <char> pl(a / 2, '*'), mi(a / 2, '+');
	pl[0] = '+';
	mi[(int)mi.size() - 1] = '*';
	for (int j = 1; j < a; j++) {
		if (sums[j] == x) {
			for (int i = a / 2 + 1; i < a; i++) {
				ans[i][j] = pl[i - a / 2 + 1];
			}
			nextpl(pl);
		}
		else if (sums[j] == -x) {
			for (int i = a / 2 + 1; i < a; i++) {
				ans[i][j] = mi[i - a / 2 + 1];
			}
			nextmi(mi);
		}
		else {
			int del = 1;
			for (int i = a / 2 + 1; i < a; i++) {
				ans[i][j] = ans[i - del][j];
				del++;
			}
		}
	}
	for (int i = 0; i < a; i++) {
		for (int j = 0; j < a; j++) {
			cout << ans[i][j];
		}
		cout << endl;
	}

	return 0;
}


#include <bits/stdc++.h>

#define pb push_back
#define mp make_pair

using namespace std;

string inv(string s) {
	string ans;
	for (int i = 0; i < (int)s.size(); i++) {
		if (s[i] == '*') {
			ans.pb('+');
		}
		else {
			ans.pb('*');
		}
	}
	return ans;
}

int main () {
	//ifstream cin("input.txt");
	//ofstream cout("output.txt");
	ios_base::sync_with_stdio(0);

	int n;
	cin >> n;
	if (n == 0) {
		cout << '*';
		return 0;
	}
	vector <string> prev;
	prev.pb("++");
	prev.pb("+*");
	vector <string> ans;
	for (int i = 2; i <= n; i++) {
		ans.resize(2 * (int)prev.size());
		for (int j = 0; j < (int)prev.size() - 1; j++) {
			ans[j] = prev[j] + prev[j];
			ans[j + (int)prev.size()] = prev[j] + prev[j];
		}
		ans[(int)ans.size() - 1] = prev.back() + inv(prev.back());
		prev = ans;
	}
	for (int i = 0; i < (int)prev.size(); i++) {
		for (int j = 0; j < (int)prev.size(); j++) {
			cout << prev[i][j];
		}
		cout << endl;
	}

	return 0;
}


#include <bits/stdc++.h>

#define pb push_back
#define mp make_pair

using namespace std;

string inv(string s) {
	string ans;
	for (int i = 0; i < (int)s.size(); i++) {
		if (s[i] == '*') {
			ans.pb('+');
		}
		else {
			ans.pb('*');
		}
	}
	return ans;
}

int main () {
	//ifstream cin("input.txt");
	//ofstream cout("output.txt");
	ios_base::sync_with_stdio(0);

	int n;
	cin >> n;
	if (n == 0) {
		cout << '*';
		return 0;
	}
	vector <string> prev;
	prev.pb("++");
	prev.pb("+*");
	vector <string> ans;
	for (int i = 2; i <= n; i++) {
		ans.resize(2 * (int)prev.size());
		for (int j = 0; j < (int)prev.size(); j++) {
			ans[j] = prev[j] + prev[j];
		}
		for (int j = (int)prev.size(); j < (int)ans.size(); j++) {
			ans[j] = prev[j - (int)prev.size()] + inv(prev[j - (int)prev.size()]);
		}
		prev = ans;
	}
	for (int i = 0; i < (int)prev.size(); i++) {
		for (int j = 0; j < (int)prev.size(); j++) {
			cout << prev[i][j];
		}
		cout << endl;
	}

	return 0;
}


#include <bits/stdc++.h>

#define pb push_back
#define mp make_pair

using namespace std;

string inv(string s) {
	string ans;
	for (int i = 0; i < (int)s.size(); i++) {
		if (s[i] == '*') {
			ans.pb('+');
		}
		else {
			ans.pb('*');
		}
	}
	return ans;
}

int main () {
	//ifstream cin("input.txt");
	//ofstream cout("output.txt");
	ios_base::sync_with_stdio(0);

	int n;
	cin >> n;
	if (n == 0) {
		cout << '*';
		return 0;
	}
	vector <string> prev;
	prev.pb("++");
	prev.pb("+*");
	vector <string> ans;
	for (int i = 2; i <= n; i++) {
		ans.resize(2 * (int)prev.size());
		for (int j = 0; j < (int)prev.size(); j++) {
			ans[j] = prev[j] + prev[j];
		}
		for (int j = (int)prev.size(); j < (int)ans.size(); j++) {
			ans[j] = prev[j] + inv(prev[j]);
		}
		prev = ans;
	}
	for (int i = 0; i < (int)prev.size(); i++) {
		for (int j = 0; j < (int)prev.size(); j++) {
			cout << prev[i][j];
		}
		cout << endl;
	}

	return 0;
}


#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cstring>
#include<string>
using namespace std;
int k;
string res[10][520];
string rev(string s){
    char tmp[520];
    int len=s.length();
    for(int i=0;i<len;i++){
        if(s[i]=='+') tmp[i]='*';
        else tmp[i]='+';
    }
    tmp[len]='\0';
    return string(tmp);
}
int main(){
    //freopen("in.txt","r",stdin);
    while(~scanf("%d",&k)){
        if(k==0) puts("+");
        res[1][0]="++",res[1][1]="+*";
        res[2][0]="++**",res[2][1]="+*+*",res[2][2]="++++",res[2][3]="+**+";
        int now=2;
        while(now<k){
            int tmp=1<<now,bou=1<<now+1,cnt=0;
            for(int i=0;i<tmp;i++){
                res[now+1][cnt++]=res[now][i]+res[now][i];
            }
            for(int i=0;i<tmp;i++){
                res[now+1][cnt++]=res[now][i]+rev(res[now][i]);
            }
            now++;
        }
        int bou=1<<k;
        for(int i=0;i<bou;i++)
            cout<<res[k][i]<<endl;
    }
    return 0;
}


#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cstring>
#include<string>
using namespace std;
int k;
string res[10][520];
string rev(string s){
    char tmp[520];
    int len=s.length();
    for(int i=0;i<len;i++){
        if(s[i]=='+') tmp[i]='*';
        else tmp[i]='+';
    }
    tmp[len]='\0';
    return string(tmp);
}
int main(){
    //freopen("in.txt","r",stdin);
    while(~scanf("%d",&k)){
        if(k==0){
            puts("+");
            continue;
        }
        res[1][0]="++",res[1][1]="+*";
        res[2][0]="++**",res[2][1]="+*+*",res[2][2]="++++",res[2][3]="+**+";
        int now=2;
        while(now<k){
            int tmp=1<<now,bou=1<<now+1,cnt=0;
            for(int i=0;i<tmp;i++){
                res[now+1][cnt++]=res[now][i]+res[now][i];
            }
            for(int i=0;i<tmp;i++){
                res[now+1][cnt++]=res[now][i]+rev(res[now][i]);
            }
            now++;
        }
        int bou=1<<k;
        for(int i=0;i<bou;i++)
            cout<<res[k][i]<<endl;
    }
    return 0;
}


#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cstring>
#include<string>
using namespace std;
int k;
string res[10][520];
string rev(string s){
    char tmp[520];
    int len=s.length();
    for(int i=0;i<len;i++){
        if(s[i]=='+') tmp[i]='*';
        else tmp[i]='+';
    }
    tmp[len]='\0';
    return string(tmp);
}
int main(){
    //freopen("in.txt","r",stdin);
    while(~scanf("%d",&k)){
        if(k==0) puts("*");
        res[1][0]="++",res[1][1]="+*";
        res[2][0]="++**",res[2][1]="+*+*",res[2][2]="++++",res[2][3]="+**+";
        int now=2;
        while(now<k){
            int tmp=1<<now,bou=1<<now+1,cnt=0;
            for(int i=0;i<tmp;i++){
                res[now+1][cnt++]=res[now][i]+res[now][i];
            }
            for(int i=0;i<tmp;i++){
                res[now+1][cnt++]=res[now][i]+rev(res[now][i]);
            }
            now++;
        }
        int bou=1<<k;
        for(int i=0;i<bou;i++)
            cout<<res[k][i]<<endl;
    }
    return 0;
}


#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cstring>
#include<string>
using namespace std;
int k;
string res[10][520];
string rev(string s){
	char tmp[520];
	int len=s.length();
	for(int i=0;i<len;i++){
		if(s[i]=='+') tmp[i]='*';
		else tmp[i]='+';
	}
	tmp[len]='\0';
	return string(tmp);
}
int main(){
	//freopen("in.txt","r",stdin);
	while(~scanf("%d",&k)){
		res[1][0]="++",res[1][1]="+*";
		res[2][0]="++**",res[2][1]="+*+*",res[2][2]="++++",res[2][3]="+**+";
		int now=2;
		while(now<k){
			int tmp=1<<now,bou=1<<now+1,cnt=0;
			for(int i=0;i<tmp;i++){
				res[now+1][cnt++]=res[now][i]+res[now][i];
			}
			for(int i=0;i<tmp;i++){
				res[now+1][cnt++]=res[now][i]+rev(res[now][i]);
			}
			now++;
		}
		int bou=1<<k;
		for(int i=0;i<bou;i++)
			cout<<res[k][i]<<endl;
	}
	return 0;
}


#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cstring>
#include<string>
using namespace std;
int k;
string res[10][520];
string rev(string s){
    char tmp[520];
    int len=s.length();
    for(int i=0;i<len;i++){
        if(s[i]=='+') tmp[i]='*';
        else tmp[i]='+';
    }
    tmp[len]='\0';
    return string(tmp);
}
int main(){
    //freopen("in.txt","r",stdin);
    while(~scanf("%d",&k)){
        res[1][0]="++",res[1][1]="+*";
        res[2][0]="++**",res[2][1]="+*+*",res[2][2]="++++",res[2][3]="+**+";
        int now=2;
        while(now<k){
            int tmp=1<<now,bou=1<<now+1,cnt=0;
            for(int i=0;i<tmp;i++){
                res[now+1][cnt++]=res[now][i]+res[now][i];
            }
            for(int i=0;i<tmp;i++){
                res[now+1][cnt++]=rev(res[now][i])+rev(res[now][i]);
            }
            now++;
        }
        int bou=1<<k;
        for(int i=0;i<bou;i++)
            cout<<res[k][i]<<endl;
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;

#define ll long long int
#define pb push_back
#define sf scanf
#define pf printf
#define F first
#define S second
#define M 1100
#define MOD 1e9+7

string toBinary(int num)
{
    string s;
    while(num)
    {
        if(num%2)
        {
            s+='1';
        }
        else
        {
            s+='0';
        }
        num/=2;
    }

    //cout << s << endl;

    return s;
}

int main()
{
    int n, power, num, k;

    string s;
    cin >> n;

    if(n==0)
    {
        cout << 0 << endl;
        return 0;
    }

    power=pow(2, n);
    num=pow(2, power)-1;

    k=sqrt(pow(2, power));
    //cout << num << "  " << k << endl;

    for(int i=0; i<power; i++, num-=k)
    {
        s=toBinary(num);
        k--;
        //cout << num << "  " << k << endl;
        for(int j=s.size(); j>=0; j--)
        {
            if(s[j]=='1')
                cout << "+";
            else
                cout << "*";
        }
        cout << endl;
    }

    return 0;
}


#include<bits/stdc++.h>
using namespace std;

#define ll long long int
#define pb push_back
#define sf scanf
#define pf printf
#define F first
#define S second
#define M 1100
#define MOD 1e9+7

string toBinary(int num)
{
    string s;
    while(num)
    {
        if(num%2)
        {
            s+='1';
        }
        else
        {
            s+='0';
        }
        num/=2;
    }

    //cout << s << endl;

    return s;
}

int main()
{
    int n, power, num, k;

    string s;
    cin >> n;

    if(n==0)
    {
        cout << 0 << endl;
        return 0;
    }

    power=pow(2, n);
    num=pow(2, power)-1;

    k=sqrt(pow(2, power));
    //cout << num << "  " << k << endl;

    for(int i=0; i<power; i++, num-=k)
    {
        s=toBinary(num);
        k--;
        //cout << num << "  " << k << endl;
        for(int j=0; j<s.size(); j++)
        {
            if(s[j]=='1')
                cout << "+";
            else
                cout << "*";
        }
        cout << endl;
    }

    return 0;
}


#include<bits/stdc++.h>
using namespace std;

#define ll long long int
#define pb push_back
#define sf scanf
#define pf printf
#define F first
#define S second
#define M 1100
#define MOD 1e9+7

string toBinary(int num)
{
    string s;
    while(num)
    {
        if(num%2)
        {
            s+='1';
        }
        else
        {
            s+='0';
        }
        num/=2;
    }

    //cout << s << endl;

    return s;
}

int main()
{
    int n, power, num, k;

    string s;
    cin >> n;

    if(n==0)
    {
        cout << 0 << endl;
        return 0;
    }

    power=pow(2, n);
    num=pow(2, power)-1;

    k=sqrt(pow(2, power));
    //cout << num << "  " << k << endl;

    for(int i=0; i<power; i++, num-=k)
    {
        s=toBinary(num);
        k--;
        //cout << num << "  " << k << endl;
        for(int j=s.size()-1; j>=0; j--)
        {
            if(s[j]=='1')
                cout << "+";
            else
                cout << "*";
        }
        cout << endl;
    }

    return 0;
}


#include<bits/stdc++.h>
using namespace std;

#define ll long long int
#define pb push_back
#define sf scanf
#define pf printf
#define F first
#define S second
#define M 1100
#define MOD 1e9+7

string toBinary(int num)
{
    string s;
    while(num)
    {
        if(num%2)
        {
            s+='1';
        }
        else
        {
            s+='0';
        }
        num/=2;
    }

    //cout << s << endl;

    return s;
}

int main()
{
    int n, power, num;

    string s;
    cin >> n;

    if(n==0)
    {
        cout << 0 << endl;
        return 0;
    }

    power=pow(2, n);

    num=power*power-1;

    for(int i=0; i<power; i++, num-=(power-i))
    {
        s=toBinary(num);
        //cout << num << endl;
        for(int j=0; j<s.size(); j++)
        {
            if(s[j]=='1')
                cout << "+";
            else
                cout << "*";
        }
        cout << endl;
    }

    return 0;
}


#include<bits/stdc++.h>
using namespace std;

#define ll long long int
#define pb push_back
#define sf scanf
#define pf printf
#define F first
#define S second
#define M 1100
#define MOD 1e9+7

int arr[1000][1000];

void func(int n)
{
    for(int i=1; i<=n; i++)
    {
        for(int j=n+1; j<=2*n; j++)
        {
            arr[i][j]=arr[i][j-n];
        }
    }

    for(int i=n+1; i<=2*n; i++)
    {
        for(int j=1; j<=n; j++)
        {
            arr[i][j]=arr[i-n][j];
        }
    }

    for(int i=n+1; i<=2*n; i++)
    {
        for(int j=n+1; j<=2*n; j++)
        {
            arr[i][j]=arr[i-n][j-n];
        }
    }

    for(int i=n+1; i<=2*n; i++)
    {
        for(int j=n+1; j<=2*n; j++)
        {
            if(arr[i][j])
                arr[i][j]=0;
            else
                arr[i][j]=1;
        }
    }
}

int main()
{
    int n=2;

    arr[1][1]=1;
    arr[1][2]=1;
    arr[2][1]=1;
    arr[2][2]=0;

    for(int i=2; i<=9; i++)
    {
        func(n);
        n*=2;
    }

    cin >> n;
    for(int i=1; i<=pow(2, n); i++)
    {
        for(int j=1; j<=pow(2, n); j++)
        {
            if(arr[i][j])
            {
                cout << "+";
            }
            else
            {
                cout << "*";
            }
        }
        cout << endl;
    }

    return 0;
}


#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <string.h>

using namespace std;

#define LL long long
#define N 4203
#define M 400001
#define MP make_pair
#define Pi acos(-1.0)
//#pragma comment(linker,"/STACK:1024000000,1024000000")
#define inf 0x3f3f3f3f
#define ls (root << 1)
#define rs (ls | 1)
#define md ((ll+rr)/2)
#define lson ll, md, ls
#define rson md+1, rr, rs
#define mod 1000000007
#define inf 0x3f3f3f3f
#define sqr(x) ((x)*(x))
#define MP make_pair
#define uLL unsigned long long
LL powmod(LL a,LL b) {LL res=1;a%=mod;for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}

int b[N][N];
string s[2][4];
int num = 0;

void f(int n,int x,int y,int fckn){
    if(n==0){
        b[x][y] = fckn;
        return;
    }
    f(n-1,x,y,fckn);
    f(n-1,x,y+(1<<(n-1)),fckn);
    f(n-1,x+(1<<(n-1)),y,fckn);
    f(n-1,x+(1<<(n-1)),y+(1<<(n-1)),fckn^1);
}
int main(){
    int k;
    cin>>k;
    int n = (1<<k);
    f(k,0,0,1);
    for(int i=0; i<n; i++){
        for(int j=0; j<n; j++)
            printf("%c",b[i][j] == 1 ? '+' : '*');
        puts("");
    }
    return 0;
}


#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <string.h>

using namespace std;

#define LL long long
#define N 42034
#define M 400001
#define MP make_pair
#define Pi acos(-1.0)
//#pragma comment(linker,"/STACK:1024000000,1024000000")
#define inf 0x3f3f3f3f
#define ls (root << 1)
#define rs (ls | 1)
#define md ((ll+rr)/2)
#define lson ll, md, ls
#define rson md+1, rr, rs
#define mod 1000000007
#define inf 0x3f3f3f3f
#define sqr(x) ((x)*(x))
#define MP make_pair
#define uLL unsigned long long
LL powmod(LL a,LL b) {LL res=1;a%=mod;for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}
int a[N];

int b[N][N];
string s[2][4];
int num = 0;

void f(int n,int x,int y,int fckn){
    if(n==0){
        b[x][y] = fckn;
        return;
    }
    f(n-1,x,y,fckn);
    f(n-1,x,y+(1<<(n-1)),fckn);
    f(n-1,x+(1<<(n-1)),y,fckn);
    f(n-1,x+(1<<(n-1)),y+(1<<(n-1)),fckn^1);
}
int main(){
    int k;
    cin>>k;
    int n = (1<<k);
    f(k,0,0,1);
    for(int i=0; i<n; i++){
        for(int j=0; j<n; j++)
            printf("%c",b[i][j] == 1 ? '+' : '*');
        puts("");
    }
    return 0;
}


#include<iostream>
#include<cstring>
#include<string>
#include<cstdio>
#include<stdio.h>
#include<algorithm>
#include<ctime>
using namespace std;

//#pragma comment(linker, "/STACK:1024000000,1024000000")
#define inf 0x3f3f3f3f
#define eps 1e-9
#define pii pair<int,int>
#define MP make_pair
#define LL  long long
#define ULL unsigned long long
#define N 100020
#define M 400020

struct node{
    int l,r,num;
    int siz,pri;
}tree[N];

int increase,leavenum,size,rt;
int n,minsalary;

void lturn(int &t){
    int k = tree[t].r;
    tree[t].r = tree[k].l;
    tree[k].l = t;
    tree[k].siz = tree[t].siz;
    tree[t].siz = tree[tree[t].l].siz + tree[tree[t].r].siz + 1;
    t = k;
}

void rturn(int &t){
    int k = tree[t].l;
    tree[t].l = tree[k].r;
    tree[k].r = t;
    tree[k].siz = tree[t].siz;
    tree[t].siz = tree[tree[t].l].siz + tree[tree[t].r].siz + 1;
    t = k;
}

void insert(int &w,int x){
    if(w==0){
        size++;
        w = size;
        tree[w].num = x;
        tree[w].siz = 1;
        tree[w].pri = rand();
        return;
    }
    if(x==tree[w].num){
        tree[w].siz++;
        return;
    }
    else if(x<tree[w].num){
        insert(tree[w].l,x);
        if(tree[tree[w].l].pri < tree[w].pri)
            rturn(w);
    }
    else if(x > tree[w].num){
        insert(tree[w].r, x);
        if(tree[tree[w].r].pri < tree[w].pri)
            lturn(w);
    }
}

void del(int &w,int x){
    if(tree[w].num == x){
        if(tree[w].siz>1){
            tree[w].siz--;
            return;
        }
        if(tree[w].l*tree[w].r == 0) w = tree[w].l+tree[w].r;
        else if(tree[tree[w].l].pri < tree[tree[w].r].pri){
            rturn(w);
            del(w, x);
        }
        else if(tree[tree[w].l].pri >= tree[tree[w].r].pri){
            lturn(w);
            del(w, x);
        }
        return;
    }
    else if(tree[w].num < x)
        del(tree[w].r, x);
    else del(tree[w].l, x);
}

int find(int w,int x){
    if(w == 0) return 0;
    //cout<<tree[w].num<<x<<endl;
    if(tree[w].num <= x) return find(tree[w].r,x)+tree[tree[w].l].siz+1;
    else return find(tree[w].l,x);
}

struct ff{
    int x,k;
    int y1,y2;

}a[N];

struct line{
    int x1,y1,x2,y2,xx;
}b[N];

bool cmp(ff x,ff y){
    return x.x == y.x ? x.k > y.k : x.x < y.x;
}

bool cmp1(line x,line y){
    if(x.xx == y.xx && x.xx == 0){
        return x.y1 == y.y1 ? x.x1 < y.x1 : x.y1 < y.y1;
    }
    else if(x.xx == y.xx && x.xx == 1){
        return x.x1 == y.x1 ? x.y1 < y.y1 : x.x1 < y.x1;
    }
    return x.xx < y.xx;
}

int main(){
    scanf("%d",&n);
    rt = 0;
    int k = 0;
    LL ans = 0;
    for(int i=1; i<=n; i++){
        int x1,y1,x2,y2;
        scanf("%d%d%d%d",&x1,&y1,&x2,&y2);
        if(y1 == y2){
            if(x1 > x2) swap(x1, x2);
            b[i].x1=x1,b[i].y1=y1,b[i].y2=y2,b[i].x2=x2,b[i].xx=0;
            //a[k].x = x1,a[k].y1 = y1,a[k].k =3;k++;
            //a[k].x = x2,a[k].y1 = y2,a[k].k = 1; k++;
        }
        else{
            if(y1 > y2) swap(y1, y2);
            b[i].x1=x1,b[i].y1=y1,b[i].y2=y2,b[i].x2=x2,b[i].xx=1;

            // a[k].x = x1,a[k].y1=y1,a[k].y2 = y2,a[k].k = 2; k++;
        }
    }
    sort(b+1,b+1+n,cmp1);
    b[0].xx = -1;
    for(int i=1; i<=n; i++){
        if(b[i].xx == 0 && b[i-1].xx == b[i].xx){
            if(b[i].y1 != b[i-1].y1) continue;
            if(b[i].x1 <= b[i-1].x2){
                b[i].x1 = b[i-1].x1;
                b[i].x2 = max(b[i].x2,b[i-1].x2);
                b[i-1].xx = 2;
            }
        }
        if(b[i].xx == 1 && b[i-1].xx == b[i].xx){
            if(b[i].x1 != b[i-1].x1) continue;
            if(b[i].y1 <= b[i-1].y2){
                b[i].y1 = b[i-1].y1;
                b[i].y2 = max(b[i-1].y2,b[i].y2);
                b[i-1].xx = 2;
            }
        }
    }
    for(int i=1; i<=n; i++){
        if(b[i].xx == 0){
            a[k].x = b[i].x1,a[k].y1 = b[i].y1,a[k].k =3;k++;
            a[k].x = b[i].x2,a[k].y1 = b[i].y1,a[k].k =1;k++;
            ans += b[i].x2-b[i].x1+1;
        }
        if(b[i].xx == 1){
            a[k].x = b[i].x1,a[k].y1 = b[i].y1,a[k].y2 = b[i].y2,a[k].k =2;k++;
            ans+= b[i].y2-b[i].y1+1;
        }
    }
    sort(a,a+k,cmp);
    for(int i=0; i<k; i++){
        if(a[i].k == 1){
            del(rt,a[i].y1);
        }
        else if(a[i].k == 3){
            insert(rt, a[i].y1);
        }
        else if(a[i].k == 2){
            LL mx1 = find(rt,a[i].y1-1);
            LL mx2 = find(rt,a[i].y2);
            ans -= mx2-mx1;
        }
    }
    printf("%lld\n",ans);
    return 0;
}


#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <string.h>

using namespace std;

#define LL long long
#define N 42034
#define M 400001
#define MP make_pair
#define Pi acos(-1.0)
//#pragma comment(linker,"/STACK:1024000000,1024000000")
#define inf 0x3f3f3f3f
#define ls (root << 1)
#define rs (ls | 1)
#define md ((ll+rr)/2)
#define lson ll, md, ls
#define rson md+1, rr, rs
#define mod 1000000007
#define inf 0x3f3f3f3f
#define sqr(x) ((x)*(x))
#define MP make_pair
#define uLL unsigned long long
LL powmod(LL a,LL b) {LL res=1;a%=mod;for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}
int a[N];

int b[N][N];

int main(){
    int k;
    cin>>k;
    if(k == 1){
        cout<<"+*\n*+\n";
        return 0;
    }
    int n = 1<<k;
    for(int j=0; j<n/2/2; j++) a[j] = 0;
    for(int j=n/2/2; j<n/2; j++) a[j] = 1;
    int x = 0;
    do{
        for(int i=0; i<n/2; i++) b[x][i] = a[i];
        x++;
    }while (next_permutation(a,a+n/2));
    int num = 0;
    for(int i=0; i<n/2; i++){
        for(int j=0; j<n/2; j++){
            for(int d=0; d<n/2; d++){
                if(b[i][d] == 0) cout<<"+";
                else cout<<"*";
            }
            for(int d=0; d<n/2; d++){
                if(b[j][d] == 0) cout<<"+";
                else cout<<"*";
            }
            cout<<endl;
            num++;
            if(num == n) break;
        }
        if(num == n) break;
    }
    return 0;
}


/**
 * @author SCaffrey (srius.caffrey@gmail.com)
 * @date    2015-12-27 21:38:53
 * @copyright MIT
 */
#include <cstdio>// NOLINT
#include <cstring>// NOLINT
#include <bits/stdc++.h>// NOLINT
#include <cmath>// NOLINT
#define x1 x11
#define y1 y11

#define f(x, y, z) for (int x = (y), __ = (z); x < __; ++x)
#define g(x, y, z) for (int x = (y), __ = (z); x <= __; ++x)
#define fd(x, y, z) for (int x = (y), __ = (z); x > __; --x)
#define gd(x, y, z) for (int x = (y), __ = (z); x >= __; --x)

#ifdef WIN32
  #define LLD "%I64d"
  #define LLU "%I64u"
#else
  #define LLD "%lld"
  #define LLU "%llu"
#endif

typedef long long LL;// NOLINT
typedef long double real;

const double INF = 1e100;
const int oo = ~0u >> 2;
const double pi = acos(-1.0);
const double EPS = 1e-8;
const int MAXN = 100033;

int map[1 << 9][1 << 9|1];
int n;
int main() {
#ifdef LOCAL
  freopen("a.in", "r", stdin);
  freopen("a.out", "w", stdout);
#endif

  scanf("%d", &n);
  map[0][0] = '+';
  f(i, 0, n) {
    int sz = 1 << i;
    f(l, 0, sz) f(r, 0, sz) {
      map[l][r + sz] = map[l][r];
      map[l + sz][r] = map[l][r];
      map[l + sz][r + sz] = '+' + '*' - map[l][r];
    }
  }
  f(i, 0, 1 << n) {
    f(j, 0, 1 << n) putchar(map[i][j]);
    puts("");
  }

#ifdef LOCAL
  fclose(stdin);
  fclose(stdout);
#endif
  return 0;
}


/**
 * @author SCaffrey (srius.caffrey@gmail.com)
 * @date    2015-12-27 18:46:18
 * @copyright MIT
 */
#include <cstdio>// NOLINT
#include <cstring>// NOLINT
#include <bits/stdc++.h>// NOLINT
#include <cmath>// NOLINT
#define x1 x11
#define y1 y11

#define f(x, y, z) for (int x = (y), __ = (z); x < __; ++x)
#define g(x, y, z) for (int x = (y), __ = (z); x <= __; ++x)
#define fd(x, y, z) for (int x = (y), __ = (z); x > __; --x)
#define gd(x, y, z) for (int x = (y), __ = (z); x >= __; --x)

#ifdef WIN32
  #define LLD "%I64d"
  #define LLU "%I64u"
#else
  #define LLD "%lld"
  #define LLU "%llu"
#endif

typedef long long LL;// NOLINT
typedef long double real;

const double INF = 1e100;
const int oo = ~0u >> 2;
const double pi = acos(-1.0);
const double EPS = 1e-8;
const int MAXN = 100033;

int n;
int main() {
#ifdef LOCAL
  freopen("a.in", "r", stdin);
  freopen("a.out", "w", stdout);
#endif

  scanf("%d", &n);
  n = 1 << n;
  f(i, 0, n) putchar('+'); puts("");
  f(i, 1, n) f(j, i + 1, n) {
    f(k, 0, n) if (k == i || k == j) putchar('*');
    else putchar('+');
    puts("");
  }

#ifdef LOCAL
  fclose(stdin);
  fclose(stdout);
#endif
  return 0;
}


/**
 * @author SCaffrey (srius.caffrey@gmail.com)
 * @date    2015-12-27 18:46:18
 * @copyright MIT
 */
#include <cstdio>// NOLINT
#include <cstring>// NOLINT
#include <bits/stdc++.h>// NOLINT
#include <cmath>// NOLINT
#define x1 x11
#define y1 y11

#define f(x, y, z) for (int x = (y), __ = (z); x < __; ++x)
#define g(x, y, z) for (int x = (y), __ = (z); x <= __; ++x)
#define fd(x, y, z) for (int x = (y), __ = (z); x > __; --x)
#define gd(x, y, z) for (int x = (y), __ = (z); x >= __; --x)

#ifdef WIN32
  #define LLD "%I64d"
  #define LLU "%I64u"
#else
  #define LLD "%lld"
  #define LLU "%llu"
#endif

typedef long long LL;// NOLINT
typedef long double real;

const double INF = 1e100;
const int oo = ~0u >> 2;
const double pi = acos(-1.0);
const double EPS = 1e-8;
const int MAXN = 100033;

int n;
int main() {
#ifdef LOCAL
  freopen("a.in", "r", stdin);
  freopen("a.out", "w", stdout);
#endif

  scanf("%d", &n);
  n = 1 << n;
  f(i, 0, n) putchar('+'); puts("");
  f(i, 0, n) if (i == 1 || i == n - 1) putchar('*'); else putchar('+');
  puts("");
  f(i, 2, n) {
    f(k, 0, n) if (k == i || k == i - 1) putchar('*'); else putchar('+');
    puts("");
  }

#ifdef LOCAL
  fclose(stdin);
  fclose(stdout);
#endif
  return 0;
}


/**
 * @author SCaffrey (srius.caffrey@gmail.com)
 * @date    2015-12-27 18:46:18
 * @copyright MIT
 */
#include <cstdio>// NOLINT
#include <cstring>// NOLINT
#include <bits/stdc++.h>// NOLINT
#include <cmath>// NOLINT
#define x1 x11
#define y1 y11

#define f(x, y, z) for (int x = (y), __ = (z); x < __; ++x)
#define g(x, y, z) for (int x = (y), __ = (z); x <= __; ++x)
#define fd(x, y, z) for (int x = (y), __ = (z); x > __; --x)
#define gd(x, y, z) for (int x = (y), __ = (z); x >= __; --x)

#ifdef WIN32
  #define LLD "%I64d"
  #define LLU "%I64u"
#else
  #define LLD "%lld"
  #define LLU "%llu"
#endif

typedef long long LL;// NOLINT
typedef long double real;

const double INF = 1e100;
const int oo = ~0u >> 2;
const double pi = acos(-1.0);
const double EPS = 1e-8;
const int MAXN = 100033;

int n;
int main() {
#ifdef LOCAL
  freopen("a.in", "r", stdin);
  freopen("a.out", "w", stdout);
#endif

  scanf("%d", &n);
  n = 1 << n;
  f(i, 0, n) putchar('+'); puts("");
  f(i, 0, n) if (i == 1 || i == n - 1) putchar('*'); else putchar('+');
  puts("");
  f(i, 2, n) {
    f(k, 0, n) if (k == i || k == i + 1) putchar('*'); else putchar('+');
    puts("");
  }

#ifdef LOCAL
  fclose(stdin);
  fclose(stdout);
#endif
  return 0;
}


#include<iostream>
using namespace std;

int n,a=1,l=1;

int pow_bin(int n)
{
	int a=1;
	for(int i=1; i<=n; ++i)
		a*=2;
	return a;
}

int main()
{
	cin>>n;
	for(int i=1; i<=n; ++i)
		l*=2;
	a=l;
	for(int i=1; i<=a; ++i)
		cout<<"+";
	cout<<"\n";
	for(int p=1; p<=n+1; ++p)
	{
		for(int m=1; m<=pow_bin(p-1)/2; ++m)
		{
			for(int j=1; j<=a; ++j)
				cout<<"+";
			for(int j=1; j<=a; ++j)
				cout<<"*";
			for(int k=1; k<=l/(2*a)-1; ++k)
			{
				if(k==m)
				{
					for(int j=1; j<=a; ++j)
						cout<<"*";
					for(int j=1; j<=a; ++j)
						cout<<"+";
				}
				else
				{
					for(int j=1; j<=a; ++j)
						cout<<"+";
					for(int j=1; j<=a; ++j)
						cout<<"*";
				}
			}
			cout<<"\n";
		}
		a/=2;
	}
	return 0;
}


#include<stdio.h>
#include<iostream>
#include<vector>
#include<cmath>
#include<algorithm>
#include<memory.h>
#include<map>
#include<set>
#include<queue>
#include<deque>
#include<list>
#include<sstream>
#include<cstring>
#include<unordered_map>

#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#define all(x) x.begin(),x.end()
#define sz(x) ((int)x.size())
#define eps 1e-9
#define sqr(x) ((x)*(x))
#define SET(a,b) memset((a),(b),sizeof((a)))
#define pw(x) (1ll<<(x))
#define buli(x) __builtin_popcountll(x)
#define endl "\n"

const int MOD = 1e9+7;
const int N = 1026;

using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef map<int,int> mii;
typedef map<string,int> msi;
typedef pair<int,int> pii;
typedef vector<pii> vpii;

inline bool EQ(double a,double b) { return fabs(a - b) < 1e-9; }
inline void set_bit(int & n, int b) { n |= pw(b); }
inline void unset_bit(int & n, int b) { n &= ~pw(b); }

int answer[N][N];
int temp[N][N];

int main() {
    // freopen("TASK.in","r",stdin);
    // freopen("TASK.out","w",stdout);
    temp[1][1]=1;
    answer[1][1]=1;
    int P;
    cin>>P;
    int i,j,k;
    int powr;
    for(i=1;i<=P;i++) {
        powr=1<<(i-1);
        for(j=1;j<=powr;j++) {
            for(k=1;k<=powr;k++) {
                answer[j][k]=temp[j][k];
                answer[j][k+powr]=temp[j][k];
                answer[j+powr][k]=temp[j][k];
                answer[j+powr][k+powr]=-1*temp[j][k];
            }
        }
        for(j=1;j<=powr*2;j++) {
            for(k=1;k<=powr*2;k++) {
                temp[j][k]=answer[j][k];
            }
        }
    }
    for(i=1;i<=(1<<P);i++) {
        for(j=1;j<=(1<<P);j++) {
            if(answer[i][j]==1)
                printf("+");
            else
                printf("*");
            if(j!=(1<<P))
                printf(" ");
        }
        printf("\n");
    }
    return 0;
}


#include<stdio.h>
#include<iostream>
#include<vector>
#include<cmath>
#include<algorithm>
#include<memory.h>
#include<map>
#include<set>
#include<queue>
#include<deque>
#include<list>
#include<sstream>
#include<cstring>//
#include<unordered_map>

#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#define all(x) x.begin(),x.end()
#define sz(x) ((int)x.size())
#define eps 1e-9
#define sqr(x) ((x)*(x))
#define SET(a,b) memset((a),(b),sizeof((a)))
#define pw(x) (1ll<<(x))
#define buli(x) __builtin_popcountll(x)
#define endl "\n"

const int MOD = 1e9+7;
const int N = 1026;

using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef map<int,int> mii;
typedef map<string,int> msi;
typedef pair<int,int> pii;
typedef vector<pii> vpii;

inline bool EQ(double a,double b) { return fabs(a - b) < 1e-9; }
inline void set_bit(int & n, int b) { n |= pw(b); }
inline void unset_bit(int & n, int b) { n &= ~pw(b); }

int answer[N][N];
int temp[N][N];

int main() {
    // freopen("TASK.in","r",stdin);
    // freopen("TASK.out","w",stdout);
    temp[1][1]=1;
    answer[1][1]=1;
    int P;
    cin>>P;
    int i,j,k;
    int powr;
    for(i=1;i<=P;i++) {
        powr=1<<(i-1);
        for(j=1;j<=powr;j++) {
            for(k=1;k<=powr;k++) {
                answer[j][k]=temp[j][k];
                answer[j][k+powr]=temp[j][k];
                answer[j+powr][k]=temp[j][k];
                answer[j+powr][k+powr]=-1*temp[j][k];
            }
        }
        for(j=1;j<=powr*2;j++) {
            for(k=1;k<=powr*2;k++) {
                temp[j][k]=answer[j][k];
            }
        }
    }
    for(int i=1;i<=(1<<P);i++) {
        for(int j=1;j<=(1<<P);j++) {
            if(answer[i][j]==1)
                printf("+ ");
            else
                printf("* ");
        }
        printf("\n");
    }
    return 0;
}


#include<stdio.h>
#include<iostream>
#include<vector>
#include<cmath>
#include<algorithm>
#include<memory.h>
#include<map>
#include<set>
#include<queue>
#include<deque>
#include<list>
#include<sstream>
#include<cstring>
#include<unordered_map>

#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#define all(x) x.begin(),x.end()
#define sz(x) ((int)x.size())
#define eps 1e-9
#define sqr(x) ((x)*(x))
#define SET(a,b) memset((a),(b),sizeof((a)))
#define pw(x) (1ll<<(x))
#define buli(x) __builtin_popcountll(x)
#define endl "\n"

const int MOD = 1e9+7;
const int N = 1026;

using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef map<int,int> mii;
typedef map<string,int> msi;
typedef pair<int,int> pii;
typedef vector<pii> vpii;

inline bool EQ(double a,double b) { return fabs(a - b) < 1e-9; }
inline void set_bit(int & n, int b) { n |= pw(b); }
inline void unset_bit(int & n, int b) { n &= ~pw(b); }

int answer[N][N];
int temp[N][N];

int main() {
    // freopen("TASK.in","r",stdin);
    // freopen("TASK.out","w",stdout);
    temp[1][1]=1;
    answer[1][1]=1;
    int P;
    cin>>P;
    int i,j,k;
    int powr;
    for(i=1;i<=P;i++) {
        powr=1<<(i-1);
        for(j=1;j<=powr;j++) {
            for(k=1;k<=powr;k++) {
                answer[j][k]=temp[j][k];
                answer[j][k+powr]=temp[j][k];
                answer[j+powr][k]=temp[j][k];
                answer[j+powr][k+powr]=-1*temp[j][k];
            }
        }
        for(j=1;j<=powr*2;j++) {
            for(k=1;k<=powr*2;k++) {
                temp[j][k]=answer[j][k];
            }
        }
    }
    for(i=1;i<=(1<<P);i++) {
        for(j=1;j<=(1<<P);j++) {
            if(answer[i][j]==1)
                printf("+");
            else
                printf("*");
        }
        printf("\n");
    }
    return 0;
}


#include<stdio.h>
#include<iostream>
#include<vector>
#include<cmath>
#include<algorithm>
#include<memory.h>
#include<map>
#include<set>
#include<queue>
#include<deque>
#include<list>
#include<sstream>
#include<cstring>
#include<unordered_map>

#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#define all(x) x.begin(),x.end()
#define sz(x) ((int)x.size())
#define eps 1e-9
#define sqr(x) ((x)*(x))
#define SET(a,b) memset((a),(b),sizeof((a)))
#define pw(x) (1ll<<(x))
#define buli(x) __builtin_popcountll(x)
#define endl "\n"

const int MOD = 1e9+7;
const int N = 1026;

using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef map<int,int> mii;
typedef map<string,int> msi;
typedef pair<int,int> pii;
typedef vector<pii> vpii;

inline bool EQ(double a,double b) { return fabs(a - b) < 1e-9; }
inline void set_bit(int & n, int b) { n |= pw(b); }
inline void unset_bit(int & n, int b) { n &= ~pw(b); }

int answer[N][N];
int temp[N][N];

int main() {
    // freopen("TASK.in","r",stdin);
    // freopen("TASK.out","w",stdout);
    temp[1][1]=1;
    answer[1][1]=1;
    int P;
    cin>>P;
    int i,j,k;
    int powr;
    for(i=1;i<=P;i++) {
        powr=1<<(i-1);
        for(j=1;j<=powr;j++) {
            for(k=1;k<=powr;k++) {
                answer[j][k]=temp[j][k];
                answer[j][k+powr]=temp[j][k];
                answer[j+powr][k]=temp[j][k];
                answer[j+powr][k+powr]=-1*temp[j][k];
            }
        }
        for(j=1;j<=powr*2;j++) {
            for(k=1;k<=powr*2;k++) {
                temp[j][k]=answer[j][k];
            }
        }
    }
    for(int i=1;i<=(1<<P);i++) {
        for(int j=1;j<=(1<<P);j++) {
            if(answer[i][j]==1)
                printf("+ ");
            else
                printf("* ");
        }
        printf("\n");
    }
    return 0;
}


#include<stdio.h>
#include<iostream>
#include<vector>
#include<cmath>
#include<algorithm>
#include<memory.h>
#include<map>
#include<set>
#include<queue>
#include<deque>
#include<list>
#include<sstream>
#include<cstring>
#include<unordered_map>

#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#define all(x) x.begin(),x.end()
#define sz(x) ((int)x.size())
#define eps 1e-9
#define sqr(x) ((x)*(x))
#define SET(a,b) memset((a),(b),sizeof((a)))
#define pw(x) (1ll<<(x))
#define buli(x) __builtin_popcountll(x)
#define endl "\n"

const int MOD = 1e9+7;
const int N = 1026;

using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef map<int,int> mii;
typedef map<string,int> msi;
typedef pair<int,int> pii;
typedef vector<pii> vpii;

inline bool EQ(double a,double b) { return fabs(a - b) < 1e-9; }
inline void set_bit(int & n, int b) { n |= pw(b); }
inline void unset_bit(int & n, int b) { n &= ~pw(b); }

int answer[N][N];
int temp[N][N];

int main() {
	// freopen("TASK.in","r",stdin);
	// freopen("TASK.out","w",stdout);
	temp[1][1]=1;
	answer[1][1]=1;
	int P;
	cin>>P;
	int i,j,k;
	int powr;
	for(i=1;i<=P;i++) {
		powr=1<<(i-1);
		for(j=1;j<=powr;j++) {
			for(k=1;k<=powr;k++) {
				answer[j][k]=temp[j][k];
				answer[j][k+powr]=temp[j][k];
				answer[j+powr][k]=temp[j][k];
				answer[j+powr][k+powr]=-1*temp[j][k];
			}
		}
		for(j=1;j<=powr*2;j++) {
			for(k=1;k<=powr*2;k++) {
				temp[j][k]=answer[j][k];
			}
		}
	}
	for(int i=1;i<=(1<<P);i++) {
		for(int j=1;j<=(1<<P);j++) {
			if(answer[i][j]==1)
				printf("+ ");
			else
				printf("* ");
		}
		printf("\n");
	}
	return 0;
}


# include <bits/stdc++.h>
using namespace std;
# define fi cin
# define fo cout
# define x first
# define y second
int n;
string d[1 << 11];
string dp[1 << 11];
string inv(string a)
{
    string ans = "";
    for (auto it : a) if (it == '+') ans += '*';else ans += '+';
    return ans;
}
int main(void)
{
    fi>>n;
    if (!n) return fo << "+\n",0;
    if (n == 1) return fo << "+*\n**\n",0;
    n = 1 << n;
    int cnt = 4;
    d[1] = "++**";
    d[2] = "+*+*";
    d[3] = "++++";
    d[4] = "+**+";
    while (cnt != n)
    {
        for (int i = 1;i <= cnt;++i) dp[i] = d[i] + inv(d[i]),dp[i+cnt] = d[i] + d[i];
        cnt *= 2;
        for (int i = 1;i <= cnt;++i) d[i] = dp[i];
    }
    for (int i = 1;i <= n;++i) fo << d[i] << '\n';
    return 0;
}


# include <bits/stdc++.h>
using namespace std;
# define fi cin
# define fo cout
# define x first
# define y second
int n;
char c[1 << 10];
string d[1 << 10];
string dp[1 << 10];
string inv(string a)
{
    string ans = "";
    for (auto it : a) if (it == '+') ans += '*';else ans += '+';
    return ans;
}
int main(void)
{
    fi>>n;
    if (n == 1) return fo << "+*\n**\n",0;
    n = 1 << n;
    int cnt = 4;
    d[1] = "++**";
d[2] = "+*+*";
d[3] = "++++";
d[4] = "+**+";
    while (cnt != n)
    {
        for (int i = 1;i <= cnt;++i) dp[i] = d[i] + inv(d[i]),dp[i+cnt] = inv(d[i]) + d[i];
        cnt *= 2;
        for (int i = 1;i <= cnt;++i) d[i] = dp[i];
    }
    for (int i = 1;i <= n;++i) fo << d[i] << '\n';
    return 0;
}


# include <bits/stdc++.h>
using namespace std;
# define fi cin
# define fo cout
# define x first
# define y second
int n;
char c[1 << 10];
string d[1 << 10];
string dp[1 << 10];
string inv(string a)
{
    string ans = "";
    for (auto it : a) if (it == '+') ans += '*';else ans += '+';
    return ans;
}
int main(void)
{
    fi>>n;
    if (n == 1) return fo << "+*\n**\n",0;
    n = 1 << n;
    int cnt = 4;
    d[1] = "++**";
    d[2] = "+*+*";
    d[3] = "++++";
    d[4] = "+**+";
    while (cnt != n)
    {
        for (int i = 1;i <= cnt;++i) dp[i] = d[i] + inv(d[i]),dp[i+cnt] = d[i] + d[i];
        cnt *= 2;
        for (int i = 1;i <= cnt;++i) d[i] = dp[i];
    }
    for (int i = 1;i <= n;++i) fo << d[i] << '\n';
    return 0;
}


# include <bits/stdc++.h>
using namespace std;
# define fi cin
# define fo cout
# define x first
# define y second
int n;
string d[1 << 11];
string dp[1 << 11];
string inv(string a)
{
    string ans = "";
    for (auto it : a) if (it == '+') ans += '*';else ans += '+';
    return ans;
}
int main(void)
{
    fi>>n;
    if (n == 1) return fo << "+*\n**\n",0;
    n = 1 << n;
    int cnt = 4;
    d[1] = "++**";
    d[2] = "+*+*";
    d[3] = "++++";
    d[4] = "+**+";
    while (cnt != n)
    {
        for (int i = 1;i <= cnt;++i) dp[i] = d[i] + inv(d[i]),dp[i+cnt] = d[i] + d[i];
        cnt *= 2;
        for (int i = 1;i <= cnt;++i) d[i] = dp[i];
    }
    for (int i = 1;i <= n;++i) fo << d[i] << '\n';
    return 0;
}


#include <iostream>
#include <vector>
#include <string>

using namespace std;

char t[4][6] = { "++**",
                 "+*+*",
                 "++++",
                 "+**+",
};

int main(int argc, char** argv) {
    // your code goes here
    int k;
    int i, j, l;
    cin >> k;
    if (k == 0) {
        cout << "*\n";
    } if (k == 1) {
        cout << "++\n+*\n";
    } if (k == 2) {
        for (i = 0; i < 4; i++)
            cout << t[i] << "\n";
    } else {
        vector<string> vs;
        for (i = 0; i < 4; i++)
                vs.push_back(t[i]);
        for (i = 3; i <= k; i++) {
            vector<string> tp;
            for (j = 0; j < (1 << (i-1)); j++) {
                tp.push_back(vs[j] + vs[j]);
                string sss = vs[j];
                for (l = 0; l < vs[j].size();l++)
                    if (vs[j][l] == '+')
                        sss = sss + '*';
                    else
                        sss = sss + '+';
                tp.push_back(sss);
            }
            vs = tp;

        }
        for(i = 0; i < (1<<k); i++)
            cout << vs[i] <<"\n";
    }

    return 0;
}


#include <iostream>
#include <vector>
#include <string>

using namespace std;

char t[4][6] = { "++**",
                 "+*+*",
                 "++++",
                 "+**+",
};

int main(int argc, char** argv) {
    // your code goes here
    int k;
    int i, j, l;
    cin >> k;
    if (k == 0) {
        cout << "*\n+\n";
    } if (k == 1) {
        cout << "++\n+*\n";
    } if (k == 2) {
        for (i = 0; i < 4; i++)
            cout << t[i] << "\n";
    } else {
        vector<string> vs;
        for (i = 0; i < 4; i++)
                vs.push_back(t[i]);
        for (i = 3; i <= k; i++) {
            vector<string> tp;
            for (j = 0; j < (1 << (i-1)); j++) {
                for (l = 0; l < (1 << (i-1)); l++) {
                    string ss ;
                    ss = vs[j] + vs[l];
                    tp.push_back(ss);
                    if (tp.size() == (1<<(i)))
                     break;
                }
                if (tp.size() == (1<<(i)))
                     break;
            }
            vs = tp;
        }
        for(i = 0; i < (1<<k); i++)
            cout << vs[i] <<"\n";
    }

    return 0;
}


#include <iostream>
#include <vector>
#include <string>

using namespace std;

char t[4][6] = { "++**",
                 "+*+*",
                 "++++",
                 "+**+",
};

int main(int argc, char** argv) {
    // your code goes here
    int k;
    int i, j, l;
    cin >> k;
    if (k == 0) {
        cout << "*\n";
    } if (k == 1) {
        cout << "++\n+*\n";
    } if (k == 2) {
        for (i = 0; i < 4; i++)
            cout << t[i] << "\n";
    } else {
        vector<string> vs;
        for (i = 0; i < 4; i++)
                vs.push_back(t[i]);
        for (i = 3; i <= k; i++) {
            vector<string> tp;
            for (j = 0; j < (1 << (i-1)); j++) {
                for (l = 0; l < (1 << (i-1)); l++) {
                    string ss ;
                    ss = vs[j] + vs[l];
                    tp.push_back(ss);
                    if (tp.size() == (1<<(i)))
                     break;
                }
                if (tp.size() == (1<<(i)))
                     break;
            }
            vs = tp;
        }
        for(i = 0; i < (1<<k); i++)
            cout << vs[i] <<"\n";
    }

    return 0;
}


#include <iostream>
#include <vector>
#include <string>

using namespace std;

char t[4][6] = { "++**",
                 "+*+*",
                 "++++",
                 "+**+",
};

int main(int argc, char** argv) {
    // your code goes here
    int k;
    int i, j, l;
    cin >> k;
    if (k == 0) {
        cout << "*\n";
    } else if (k == 1) {
        cout << "++\n+*\n";
    } else if (k == 2) {
        for (i = 0; i < 4; i++)
            cout << t[i] << "\n";

    } else {
        vector<string> vs;
        for (i = 0; i < 4; i++)
                vs.push_back(t[i]);
        for (i = 3; i <= k; i++) {
            vector<string> tp;
            for (j = 0; j < (1 << (i-1)); j++) {
                tp.push_back(vs[j] + vs[j]);
                string sss = vs[j];
                for (l = 0; l < vs[j].size();l++)
                    if (vs[j][l] == '+')
                        sss = sss + '*';
                    else
                        sss = sss + '+';
                tp.push_back(sss);
            }
            vs = tp;

        }
        for(i = 0; i < (1<<k); i++)
            cout << vs[i] <<"\n";
    }

    return 0;
}


#include <bits/stdc++.h>
#define SZ(x) (int)x.size()
const int SZ=2e5+5;
typedef long long ll;
using namespace std;

int n,sz;
bool vis[SZ];
int pow2[]={1,2,4,8,16,32,64,128,256,512,1024,2048};

bool valid(int a,int b)
{
    int sum=0;
    for(int k=0;k<pow2[n];k++)
    {
    	sum+=(a%2!=b%2);
        a/=2, b/=2;
    }

    return sum==pow2[n]/2;
}

string toString(int x)
{
	string res="";
    for(int k=0;k<pow2[n];k++)
    	res=(char)(x%2+'0')+res, x/=2;
    return res;
}

int main()
{
    cin>>n;
    vector< vector<int> > res(pow2[10]+1);

    for(int i=0;i<pow2[10];i++)
    {
        for(int j=0;j<pow2[10];j++)
        {
	    	if(valid(i,j))
	        	res[i].push_back(j);
        }
    }

    int cur=0,idx=0;
    vector<int> ans;

    while(idx<pow2[n])
    {
    	vis[cur]=1;
    	for(int i=0;i<SZ(res[cur]);i++)
    	    if(vis[res[cur][i]]==0)
    	    {
    	    	ans.push_back(res[cur][i]),
        	    vis[res[cur][i]]=1,
    	        cur=res[cur][i],
    	        idx++;
    	        break;
    	    }
    }

    vector<string> num;
    num.push_back(toString(0));
    for(int i=0;i<pow2[n];i++)
        num.push_back(toString(ans[i]));

    for(int i=0;i<pow2[n];i++)
    {
        for(int j=0;j<pow2[n];j++)
        	cout<<(num[i][j]=='0'?'*':'+');
        cout<<'\n';
    }
}


#include <bits/stdc++.h>
#define SZ(x) (int)x.size()
const int SZ=1e5+5;
const char ch[]={'+','*'};
using namespace std;

int main()
{
    int n; cin>>n;
    vector<string> res;
    res.push_back(ch[0]+"");

    for(int i=0;i<n;i++)
    {
        for(int j=0;j<SZ(res);j++)
            res[j]+=res[j];

        int sz=SZ(res);
        for(int j=0;j<sz;j++)
        {
            res.push_back(res[j]);
            for(int k=sz;k<sz*2;k++)
                res[j][k]=ch[res[j][k]=='+'];
        }
    }

    for(int i=0;i<SZ(res);i++)
        cout<<res[i]<<'\n';
}


#include <bits/stdc++.h>
#define SZ(x) (int)x.size()
const int SZ=2e5+5;
typedef long long ll;
using namespace std;

int n,sz;
bool vis[SZ];
int pow2[]={1,2,4,8,16,32,64,128,256,512,1024,2048};

bool valid(int a,int b)
{
    int sum=0;
    for(int k=0;k<pow2[n];k++)
    {
    	sum+=(a%2!=b%2);
        a/=2, b/=2;
    }

    return sum==pow2[n]/2;
}

string toString(int x)
{
	string res="";
    for(int k=0;k<pow2[n];k++)
    	res=(char)(x%2+'0')+res, x/=2;
    return res;
}

int main()
{
    cin>>n;
    vector< vector<int> > res(pow2[10]+1);

    for(int i=0;i<pow2[10];i++)
    {
        for(int j=0;j<pow2[10];j++)
        {
	    	if(valid(i,j))
	        	res[i].push_back(j);
        }
    }

    int cur=0,idx=0;
    vector<int> ans;

    while(idx<pow2[n])
    {
    	vis[cur]=1;
    	for(int i=0;i<SZ(res[cur]);i++)
    	    if(vis[res[cur][i]]==0)
    	    {
    	    	ans.push_back(res[cur][i]),
        	    vis[res[cur][i]]=1,
    	        cur=res[cur][i],
    	        idx++;
    	        break;
    	    }
    }

    vector<string> num;
    for(int i=0;i<pow2[n];i++)
        num.push_back(toString(ans[i]));

    for(int i=0;i<pow2[n];i++)
    {
        for(int j=0;j<pow2[n];j++)
        	cout<<(num[j][i]=='0'?'*':'+');
        cout<<'\n';
    }
}


#include <bits/stdc++.h>
#define SZ(x) (int)x.size()
const int SZ=1e5+5;
using namespace std;

int main()
{
    int n; cin>>n;
    vector<string> res;
    res.push_back("+");

    for(int i=0;i<n;i++)
    {
        for(int j=0;j<SZ(res);j++)
            res[j]+=res[j];

        int sz=SZ(res);
        for(int j=0;j<sz;j++)
        {
            res.push_back(res[j]);
            for(int k=sz;k<sz*2;k++)
                res[j][k]=(res[j][k]=='*')?'+':'*';
        }
    }

    for(int i=0;i<SZ(res);i++)
        cout<<res[i]<<'\n';
}


#include <bits/stdc++.h>
#define SZ(x) (int)x.size()
const int SZ=2e5+5;
typedef long long ll;
using namespace std;

int n,sz;
bool vis[SZ];
int pow2[]={1,2,4,8,16,32,64,128,256,512,1024,2048};

bool valid(int a,int b)
{
    int sum=0;
    for(int k=0;k<pow2[n];k++)
    {
    	sum+=(a%2!=b%2);
        a/=2, b/=2;
    }

    return sum==pow2[n]/2;
}

string toString(int x)
{
	string res="";
    for(int k=0;k<pow2[n];k++)
    	res=(char)(x%2+'0')+res, x/=2;
    return res;
}

int main()
{
    cin>>n;
    vector< vector<int> > res(pow2[10]+1);

    for(int i=0;i<pow2[10];i++)
    {
        for(int j=0;j<pow2[10];j++)
        {
	    	if(valid(i,j))
	        	res[i].push_back(j);
        }
    }

    int cur=0,idx=0;
    vector<int> ans;

    while(idx<pow2[n])
    {
    	vis[cur]=1;
    	for(int i=0;i<SZ(res[cur]);i++)
    	    if(vis[res[cur][i]]==0)
    	    {
    	    	ans.push_back(res[cur][i]),
        	    vis[res[cur][i]]=1,
    	        cur=res[cur][i],
    	        idx++;
    	        break;
    	    }
    }

    vector<string> num;
    for(int i=0;i<pow2[n];i++)
        num.push_back(toString(ans[i]));

    for(int i=0;i<pow2[n];i++)
    {
        for(int j=0;j<pow2[n];j++)
        	cout<<(num[i][j]=='0'?'*':'+');
        cout<<'\n';
    }
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vll;
#define forn(i, n) for(ll i = 0; i < (ll)n; i++)
#define fornn(i, q, n) for(ll i = (ll)q; i < (ll)n; i++)
#define parr(arr,n) for(ll i=0;i<n;i++){cout << arr[i] << " ";} cout<<endl;
#define fore(i, x) for(__typeof((x).begin()) i = (x).begin(); i != (x).end(); i ++)
#define mem(x,val) memset((x),(val),sizeof(x));
#define pb push_back
#define mp make_pair
#define p push
#define f front
#define F first
#define S second
#define pvec(vec) for(ll i=0;i<vec.size();i++){cout<<vec[i]<<" ";} cout<<endl;
#define INF 2000000000
#define MOD 1000000007
const ll maxn=2e5 + 4;
const ll MAXN=1000000+10;

ll power (ll x, unsigned int y)
{
    ll temp;
    if (y == 0)
        return 1;

    temp = power (x, y / 2);
    if ((y % 2) == 0)
        return temp * temp;
    else
        return x * temp * temp;
}

ll n;
vll v[2000];

ll inv(ll a){
    if(a==-1)return 1;
    else return -1;
}

char to(ll a){
    if(a==1)return '+';
    else return '*';
}

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
    cin>>n;
    if(n==0){
        cout<<"+\n";
        return 0;
    }
    if(n==1){
        cout<<"++\n";
        cout<<"+*\n";
        return 0;
    }

    v[0].pb(1); v[0].pb(1); v[0].pb(-1); v[0].pb(-1);
    v[1].pb(1); v[1].pb(-1); v[1].pb(1); v[1].pb(-1);
    v[2].pb(1); v[2].pb(1); v[2].pb(1); v[2].pb(1);
    v[3].pb(1); v[3].pb(-1); v[3].pb(-1); v[3].pb(1);

    ll ppwr=4,cpwr=8;
    for(ll i=3;i<=n;i++){
        //right
        for(ll j=0;j<ppwr;j++){
            for(ll k=0;k<ppwr;k++){
                v[j].pb(v[j][k]);
            }
        }

        //bottom-left
        for(ll j=ppwr;j<cpwr;j++){
            for(ll k=0;k<ppwr;k++){
                v[j].pb(v[j-ppwr][k]);
            }
        }
        //bottom-right

        for(ll j=ppwr;j<cpwr;j++){
            for(ll k=ppwr;k<cpwr;k++){
                v[j].pb(inv(v[j-ppwr][k-ppwr]));
            }
        }

        ppwr=cpwr;
        cpwr*=2;
    }

    forn(i,power(2, n)){
        forn(j,v[i].size()){
            cout<<to(v[i][j]);
        }
        cout<<endl;
    }

	return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vll;
#define forn(i, n) for(ll i = 0; i < (ll)n; i++)
#define fornn(i, q, n) for(ll i = (ll)q; i < (ll)n; i++)
#define parr(arr,n) for(ll i=0;i<n;i++){cout << arr[i] << " ";} cout<<endl;
#define fore(i, x) for(__typeof((x).begin()) i = (x).begin(); i != (x).end(); i ++)
#define mem(x,val) memset((x),(val),sizeof(x));
#define pb push_back
#define mp make_pair
#define p push
#define f front
#define F first
#define S second
#define pvec(vec) for(ll i=0;i<vec.size();i++){cout<<vec[i]<<" ";} cout<<endl;
#define INF 2000000000
#define MOD 1000000007
const ll maxn=2e5 + 4;

ll gcd(ll a, ll b) {
  while (a > 0 && b > 0)
    if (a > b) a %= b;
    else b %= a;
  return a+b;
}

ll power (ll x, unsigned int y)
{
    ll temp;
    if (y == 0)
        return 1;

    temp = power (x, y / 2);
    if ((y % 2) == 0)
        return temp * temp;
    else
        return x * temp * temp;
}

//string s[3];

//string ans[1024];
ll k,n;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cin>>k;
//    cout<<" fssg\n";
    string s[4];
    s[0]="++++";
    s[1]="++**";
    s[2]="+**+";
    s[3]="+*+*";
    n=power(2,k);
    if(k==0){
        cout<<"+\n";
        return 0;
    }
    if(k==1){
        cout<<"++\n";
        cout<<"*+\n";
        return 0;
    }
//    string ans[n];

/*
    forn(i,n){
        ans[0][i]='+';
    }
*/
    ll parts=n/4;
    string fin[parts];
    int cnt[parts];

    forn(i,parts){
        cnt[i]=0;
    }

    forn(i,n){

        forn(j,parts){
//            cout<<cnt[j]<<"  --- "<<j<<endl;
            fin[j]=s[cnt[j]];
            cnt[j]=(cnt[j]+1)%4;
        }
//        ans[i]=fin[0];
        fornn(j,0,parts){
            cout<<fin[j];
        }
        cout<<endl;
    }
/*
    forn(i,n){
        cout<<ans[i]<<endl;
    }
*/
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vll;
#define forn(i, n) for(ll i = 0; i < (ll)n; i++)
#define fornn(i, q, n) for(ll i = (ll)q; i < (ll)n; i++)
#define parr(arr,n) for(ll i=0;i<n;i++){cout << arr[i] << " ";} cout<<endl;
#define fore(i, x) for(__typeof((x).begin()) i = (x).begin(); i != (x).end(); i ++)
#define mem(x,val) memset((x),(val),sizeof(x));
#define pb push_back
#define mp make_pair
#define p push
#define f front
#define F first
#define S second
#define pvec(vec) for(ll i=0;i<vec.size();i++){cout<<vec[i]<<" ";} cout<<endl;
#define INF 2000000000
#define MOD 1000000007
const ll maxn=2e5 + 4;

ll gcd(ll a, ll b) {
  while (a > 0 && b > 0)
    if (a > b) a %= b;
    else b %= a;
  return a+b;
}

ll power (ll x, unsigned int y)
{
    ll temp;
    if (y == 0)
        return 1;

    temp = power (x, y / 2);
    if ((y % 2) == 0)
        return temp * temp;
    else
        return x * temp * temp;
}

//string s[3];

//string ans[1024];
ll k,n;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cin>>k;
//    cout<<" fssg\n";
    string s[4];
    s[0]="++++";
    s[1]="++**";
    s[2]="+**+";
    s[3]="+*+*";
    n=power(2,k);
    if(k==0){
        cout<<"+\n";
        return 0;
    }
//    string ans[n];

/*
    forn(i,n){
        ans[0][i]='+';
    }
*/
    ll parts=n/4;
    string fin[parts];
    int cnt[parts];

    forn(i,parts){
        cnt[i]=0;
    }

    forn(i,n){

        forn(j,parts){
//            cout<<cnt[j]<<"  --- "<<j<<endl;
            fin[j]=s[cnt[j]];
            cnt[j]=(cnt[j]+1)%4;
        }
//        ans[i]=fin[0];
        fornn(j,0,parts){
            cout<<fin[j];
        }
        cout<<endl;
    }
/*
    forn(i,n){
        cout<<ans[i]<<endl;
    }
*/
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vll;
#define forn(i, n) for(ll i = 0; i < (ll)n; i++)
#define fornn(i, q, n) for(ll i = (ll)q; i < (ll)n; i++)
#define parr(arr,n) for(ll i=0;i<n;i++){cout << arr[i] << " ";} cout<<endl;
#define fore(i, x) for(__typeof((x).begin()) i = (x).begin(); i != (x).end(); i ++)
#define mem(x,val) memset((x),(val),sizeof(x));
#define pb push_back
#define mp make_pair
#define p push
#define f front
#define F first
#define S second
#define pvec(vec) for(ll i=0;i<vec.size();i++){cout<<vec[i]<<" ";} cout<<endl;
#define INF 2000000000
#define MOD 1000000007
const ll maxn=2e5 + 4;

ll gcd(ll a, ll b) {
  while (a > 0 && b > 0)
    if (a > b) a %= b;
    else b %= a;
  return a+b;
}

ll power (ll x, unsigned int y)
{
    ll temp;
    if (y == 0)
        return 1;

    temp = power (x, y / 2);
    if ((y % 2) == 0)
        return temp * temp;
    else
        return x * temp * temp;
}

//string s[3];

//string ans[1024];
ll k,n;
ll parts;

string s[4];
ll num;

void dfs(int cnt,string a){
//    cout<<parts<<" --\n";
    if(cnt==parts){
        if(num>=n)return;
        cout<<a<<endl;
        num++;
        return;
    }
    string ret;
    forn(i,4){
        ret=a+s[i];
        dfs(cnt+1,ret);
    }
    return;
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cin>>k;
//    cout<<" fssg\n";
//    string s[4];
    s[0]="++++";
    s[1]="++**";
    s[2]="+**+";
    s[3]="+*+*";
    n=power(2,k);
    if(k==0){
        cout<<"+\n";
        return 0;
    }
    if(k==1){
        cout<<"++\n";
        cout<<"*+\n";
        return 0;
    }
//    string ans[n];

/*
    forn(i,n){
        ans[0][i]='+';
    }
*/
    parts=n/4;
//    string fin[parts];
//    int cnt[parts];
/*
    forn(i,parts){
        cnt[i]=0;
    }
*/    string a;

    dfs(0,a);
/*
    forn(i,n){

        forn(j,parts){
//            cout<<cnt[j]<<"  --- "<<j<<endl;
            fin[j]=s[cnt[j]];
            cnt[j]=(cnt[j]+1)%4;
        }
//        ans[i]=fin[0];
        fornn(j,0,parts){
            cout<<fin[j];
        }
        cout<<endl;
    }
    */
/*
    forn(i,n){
        cout<<ans[i]<<endl;
    }
*/
    return 0;
}


# include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
typedef pair< ll, ll > pll;

const ll maxN = ll(8e5);
const ll smaxN = ll(5e3);
const ll mmaxN = ll(3e4);
const ll lmaxN = ll(3e6);
const ll oo = ll(1e18);
const ll MOD = ll(1e9) + 7;
const ld EPS = 1e-10;
const ld PI = acos(0.0) * 2;
const ll LOGMAX = 22;
const ll dx[] = {-1, +0, +0, +1};
const ll dy[] = {+0, -1, +1, +0};

template<typename T>
T Sqr(T x) {
    return x * x;
}

template<class T>
ll Sz(T x) {
    return ll(x.size());
}

inline ll MultMod(ll a, ll b, ll mod) {
    if(b == 0)
        return 0;
    if(b % 2)
        return (MultMod(a, b - 1, mod) + a) % mod;
    return (MultMod(a, b / 2, mod) * 2) % mod;
}

inline ll ModPow(ll a, ll b, ll mod) {
    if(b == 0)
        return 1;
    if(b == 1)
        return a;
    if(b % 2)
        return (ModPow(a, b - 1, mod) * a) % mod;
    ll z = ModPow(a, b / 2, mod);
    return (z * z) % mod;
}

inline bool Prime(ll x){
    if(x < 2)
        return 0;
    for(ll i = 2; i * i <= x; ++i) {
        if(x % i == 0)
            return 0;
    }
    return 1;
}

inline bool IsProbablePrime(ll x) {
    return 1; // -> returns 1
}

ll k, n = 1;

int main(){

    cin >> k;

    n = (1LL << k);
    int c = n;
    for(ll i = 0; i < n; i++){
        for(ll j = 0; j < n; j++){
            for(ll m = 0; m < c; m++){
                    printf("+");
                    j++;
            }
            if(c != n){
                for (int m = 0; m < c; m++){
                    printf("*");
                    j++;
                }
            }
        }
        c /= 2;
        puts("");
    }
    return 0;
}


# include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
typedef pair< ll, ll > pll;

const ll maxN = ll(8e5);
const ll smaxN = ll(5e3);
const ll mmaxN = ll(3e4);
const ll lmaxN = ll(3e6);
const ll oo = ll(1e18);
const ll MOD = ll(1e9) + 7;
const ld EPS = 1e-10;
const ld PI = acos(0.0) * 2;
const ll LOGMAX = 22;
const ll dx[] = {-1, +0, +0, +1};
const ll dy[] = {+0, -1, +1, +0};

template<typename T>
T Sqr(T x) {
    return x * x;
}

template<class T>
ll Sz(T x) {
    return ll(x.size());
}

inline ll MultMod(ll a, ll b, ll mod) {
    if(b == 0)
        return 0;
    if(b % 2)
        return (MultMod(a, b - 1, mod) + a) % mod;
    return (MultMod(a, b / 2, mod) * 2) % mod;
}

inline ll ModPow(ll a, ll b, ll mod) {
    if(b == 0)
        return 1;
    if(b == 1)
        return a;
    if(b % 2)
        return (ModPow(a, b - 1, mod) * a) % mod;
    ll z = ModPow(a, b / 2, mod);
    return (z * z) % mod;
}

inline bool Prime(ll x){
    if(x < 2)
        return 0;
    for(ll i = 2; i * i <= x; ++i) {
        if(x % i == 0)
            return 0;
    }
    return 1;
}

inline bool IsProbablePrime(ll x) {
    return 1; // -> returns 1
}

ll n;

int main(){
    cin >> n;
    for(ll i = 1; i <= (1LL << n); ++i){
        for(ll j = 1; j <= (1LL << n); ++j){
            if((i * j) % 2)
                cout << "*";
            else
                cout << "+";
        }
        cout << "\n";
    }

    return 0;
}


# include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
typedef pair< ll, ll > pll;

const ll maxN = ll(8e5);
const ll smaxN = ll(5e3);
const ll mmaxN = ll(3e4);
const ll lmaxN = ll(3e6);
const ll oo = ll(1e18);
const ll MOD = ll(1e9) + 7;
const ld EPS = 1e-10;
const ld PI = acos(0.0) * 2;
const ll LOGMAX = 22;
const ll dx[] = {-1, +0, +0, +1};
const ll dy[] = {+0, -1, +1, +0};

template<typename T>
T Sqr(T x) {
    return x * x;
}

template<class T>
ll Sz(T x) {
    return ll(x.size());
}

inline ll MultMod(ll a, ll b, ll mod) {
    if(b == 0)
        return 0;
    if(b % 2)
        return (MultMod(a, b - 1, mod) + a) % mod;
    return (MultMod(a, b / 2, mod) * 2) % mod;
}

inline ll ModPow(ll a, ll b, ll mod) {
    if(b == 0)
        return 1;
    if(b == 1)
        return a;
    if(b % 2)
        return (ModPow(a, b - 1, mod) * a) % mod;
    ll z = ModPow(a, b / 2, mod);
    return (z * z) % mod;
}

inline bool Prime(ll x){
    if(x < 2)
        return 0;
    for(ll i = 2; i * i <= x; ++i) {
        if(x % i == 0)
            return 0;
    }
    return 1;
}

inline bool IsProbablePrime(ll x) {
    return 1; // -> returns 1
}
ll X[11];
ll A[10][1<<10][1<<10];
int main(){
    ll K,i,j,k;
    cin>>K;
    A[0][0][0]=1;
    for (i=0;i<11;++i)
        X[i]=(1<<i);
    for (k=1;k<=K;++k)
    {
        for (i=0;i<X[k-1];++i)
            for (j=0;j<X[k-1];++j)
            A[k][i][j]=A[k-1][i][j];

        for (i=0;i<X[k-1];++i)
            for (j=X[k-1];j<X[k];++j)
            A[k][i][j]=A[k-1][i][j-X[k-1]];

        for (i=X[k-1];i<X[k];++i)
            for (j=0;j<X[k-1];++j)
            A[k][i][j]=A[k-1][i-X[k-1]][j];

        for (i=X[k-1];i<X[k];++i)
            for (j=X[k-1];j<X[k];++j)
            A[k][i][j]=A[k-1][i-X[k-1]][j-X[k-1]]*(-1);
    }
    for (i=0;i<X[K];++i)
    {
        for (j=0;j<X[K];++j)
        {
            if (A[K][i][j]==1)
                cout<<"+";
            else
                cout<<"*";
        }
        cout<<"\n";
    }

    return 0;
}


# include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
typedef pair< ll, ll > pll;

const ll maxN = ll(8e5);
const ll smaxN = ll(5e3);
const ll mmaxN = ll(3e4);
const ll lmaxN = ll(3e6);
const ll oo = ll(1e18);
const ll MOD = ll(1e9) + 7;
const ld EPS = 1e-10;
const ld PI = acos(0.0) * 2;
const ll LOGMAX = 22;
const ll dx[] = {-1, +0, +0, +1};
const ll dy[] = {+0, -1, +1, +0};

template<typename T>
T Sqr(T x) {
    return x * x;
}

template<class T>
ll Sz(T x) {
    return ll(x.size());
}

inline ll MultMod(ll a, ll b, ll mod) {
    if(b == 0)
        return 0;
    if(b % 2)
        return (MultMod(a, b - 1, mod) + a) % mod;
    return (MultMod(a, b / 2, mod) * 2) % mod;
}

inline ll ModPow(ll a, ll b, ll mod) {
    if(b == 0)
        return 1;
    if(b == 1)
        return a;
    if(b % 2)
        return (ModPow(a, b - 1, mod) * a) % mod;
    ll z = ModPow(a, b / 2, mod);
    return (z * z) % mod;
}

inline bool Prime(ll x){
    if(x < 2)
        return 0;
    for(ll i = 2; i * i <= x; ++i) {
        if(x % i == 0)
            return 0;
    }
    return 1;
}

inline bool IsProbablePrime(ll x) {
    return 1; // -> returns 1
}

ll k, n;

int main(){

    cin >> k;

    n = (1LL << k);
    ll c = n;

    for (ll i = 0; i < n ; i++){
        for (ll j = 0; j < n; ){
            if (i == n - 1 && j == n - 2) {
                printf("+");
                break;
            }
            for(ll m = 0; m < c; m++){
                printf("+");
                j++;
            }

            if (c != n){
                for (ll m = 0; m < c; m++){
                    printf("*");
                    j++;
                }
            }
        }
        if (c > 1) c /= 2;
        puts("");
    }

    return 0;
}


# include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
typedef pair< ll, ll > pll;

const ll maxN = ll(8e5);
const ll smaxN = ll(5e3);
const ll mmaxN = ll(3e4);
const ll lmaxN = ll(3e6);
const ll oo = ll(1e18);
const ll MOD = ll(1e9) + 7;
const ld EPS = 1e-10;
const ld PI = acos(0.0) * 2;
const ll LOGMAX = 22;
const ll dx[] = {-1, +0, +0, +1};
const ll dy[] = {+0, -1, +1, +0};

template<typename T>
T Sqr(T x) {
    return x * x;
}

template<class T>
ll Sz(T x) {
    return ll(x.size());
}

inline ll MultMod(ll a, ll b, ll mod) {
    if(b == 0)
        return 0;
    if(b % 2)
        return (MultMod(a, b - 1, mod) + a) % mod;
    return (MultMod(a, b / 2, mod) * 2) % mod;
}

inline ll ModPow(ll a, ll b, ll mod) {
    if(b == 0)
        return 1;
    if(b == 1)
        return a;
    if(b % 2)
        return (ModPow(a, b - 1, mod) * a) % mod;
    ll z = ModPow(a, b / 2, mod);
    return (z * z) % mod;
}

inline bool Prime(ll x){
    if(x < 2)
        return 0;
    for(ll i = 2; i * i <= x; ++i) {
        if(x % i == 0)
            return 0;
    }
    return 1;
}

inline bool IsProbablePrime(ll x) {
    return 1; // -> returns 1
}

ll n;

int main(){
    cin >> n;
    for(ll i = 1; i <= (1LL << n); ++i){
        for(ll j = 1; j <= (1LL << n); ++j){
            if(__gcd(i, j) == 1)
                cout << "*";
            else
                cout << "+";
        }
        cout << "\n";
    }

    return 0;
}


# include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
typedef pair< ll, ll > pll;

const ll maxN = ll(8e5);
const ll smaxN = ll(5e3);
const ll mmaxN = ll(3e4);
const ll lmaxN = ll(3e6);
const ll oo = ll(1e18);
const ll MOD = ll(1e9) + 7;
const ld EPS = 1e-10;
const ld PI = acos(0.0) * 2;
const ll LOGMAX = 22;
const ll dx[] = {-1, +0, +0, +1};
const ll dy[] = {+0, -1, +1, +0};

template<typename T>
T Sqr(T x) {
    return x * x;
}

template<class T>
ll Sz(T x) {
    return ll(x.size());
}

inline ll MultMod(ll a, ll b, ll mod) {
    if(b == 0)
        return 0;
    if(b % 2)
        return (MultMod(a, b - 1, mod) + a) % mod;
    return (MultMod(a, b / 2, mod) * 2) % mod;
}

inline ll ModPow(ll a, ll b, ll mod) {
    if(b == 0)
        return 1;
    if(b == 1)
        return a;
    if(b % 2)
        return (ModPow(a, b - 1, mod) * a) % mod;
    ll z = ModPow(a, b / 2, mod);
    return (z * z) % mod;
}

inline bool Prime(ll x){
    if(x < 2)
        return 0;
    for(ll i = 2; i * i <= x; ++i) {
        if(x % i == 0)
            return 0;
    }
    return 1;
}

inline bool IsProbablePrime(ll x) {
    return 1; // -> returns 1
}

ll k, n;

int main(){

    cin >> k;

    n = (1LL << k);
    int c = n;

    for (ll i = 0; i < n ; i++){

        for (ll j = 0; j < n; ){
            if (i == n-1 && j == n-2) {
                printf("+")
                break;
            }
            for(ll m = 0; m < c; m++){
                printf("+");
                j++;
            }

            if (c != n){
                for (int m = 0; m < c; m++){
                    printf("*");
                    j++;
                }
            }
        }
        if (c > 1) c /= 2;
        puts("");
    }

    return 0;
}


# include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
typedef pair< ll, ll > pll;

const ll maxN = ll(8e5);
const ll smaxN = ll(5e3);
const ll mmaxN = ll(3e4);
const ll lmaxN = ll(3e6);
const ll oo = ll(1e18);
const ll MOD = ll(1e9) + 7;
const ld EPS = 1e-10;
const ld PI = acos(0.0) * 2;
const ll LOGMAX = 22;
const ll dx[] = {-1, +0, +0, +1};
const ll dy[] = {+0, -1, +1, +0};

template<typename T>
T Sqr(T x) {
    return x * x;
}

template<class T>
ll Sz(T x) {
    return ll(x.size());
}

inline ll MultMod(ll a, ll b, ll mod) {
    if(b == 0)
        return 0;
    if(b % 2)
        return (MultMod(a, b - 1, mod) + a) % mod;
    return (MultMod(a, b / 2, mod) * 2) % mod;
}

inline ll ModPow(ll a, ll b, ll mod) {
    if(b == 0)
        return 1;
    if(b == 1)
        return a;
    if(b % 2)
        return (ModPow(a, b - 1, mod) * a) % mod;
    ll z = ModPow(a, b / 2, mod);
    return (z * z) % mod;
}

inline bool Prime(ll x){
    if(x < 2)
        return 0;
    for(ll i = 2; i * i <= x; ++i) {
        if(x % i == 0)
            return 0;
    }
    return 1;
}

inline bool IsProbablePrime(ll x) {
    return 1; // -> returns 1
}

ll n;

int main(){
    cin >> n;
    for(ll i = 1; i <= (1LL << n); ++i){
        for(ll j = 1; j <= (1LL << n); ++j){
            if((i + j) % 2)
                cout << "*";
            else
                cout << "+";
        }
        cout << "\n";
    }

    return 0;
}


#include <stdio.h>
#include <iostream>
#include <fstream>
#include <iomanip>
#include <string>
#include <cstring>
#include <cctype>
#include <vector>
#include <array>
#include <list>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <queue>
#include <deque>
#include <functional>
#include <algorithm>
#include <cmath>
#include <climits>
#include <cfloat>
#include <cassert>

using namespace std;

typedef long long ll;
typedef long double real;
typedef pair<int, int> ii;

const real PI = acos((real)-1);
const ll MOD = 1000000007;

void ioFromFile(string inputFileName = "input.txt",
	string outputFileName = "output.txt") {
	ifstream* fin = new ifstream(inputFileName);
	ofstream* fout = new ofstream(outputFileName);
	cin.rdbuf(fin->rdbuf());
	cout.rdbuf(fout->rdbuf());
}

int read() { int x; scanf("%d", &x); return x; }
void write(int x) { printf("%d ", x); }
//---------------------------------------------------

const char MINUS = '*';
const char PLUS = '+';

const int N = 1 << 9;

int n;
int at;
char m[N][N];

void f(int y, int s, int e){
	int l = e - s;
	if (l < 4) return;

	for (int x = 0; x < n; x++){
		m[at][x] = m[y][x];
	}
	for (int x = s + l / 4; x < s + l / 2; x++){
		if (m[at][x] == PLUS) m[at][x] = MINUS;
		else m[at][x] = PLUS;
	}
	for (int x = s + 3 * l / 4; x < s + l; x++){
		if (m[at][x] == PLUS) m[at][x] = MINUS;
		else m[at][x] = PLUS;
	}
	at++;
	f(at - 1, s, s + l / 2);

	for (int x = 0; x < n; x++){
		m[at][x] = m[y][x];
	}
	for (int x = s; x < s + l / 4; x++){
		if (m[at][x] == PLUS) m[at][x] = MINUS;
		else m[at][x] = PLUS;
	}
	for (int x = s + 3 * l / 4; x < s + l; x++){
		if (m[at][x] == PLUS) m[at][x] = MINUS;
		else m[at][x] = PLUS;
	}
	at++;
	f(at - 1, s, s + l / 2);
}

int main(){
	n = 1 << read();

	for (int i = 0; i < n; i++){
		m[0][i] = PLUS;
		m[1][i] = PLUS;
	}
	for (int i = 0; i < n / 2; i++){
		m[1][i] = MINUS;
	}

	at = 2;
	f(1, 0, n);

	for (int y = 0; y < n; y++){
		for (int x = 0; x < n; x++){
			printf("%c", m[y][x]);
		}
		printf("\n");
	}

	return 0;
}

/*

*/


#include <stdio.h>
#include <iostream>
#include <fstream>
#include <iomanip>
#include <string>
#include <cstring>
#include <cctype>
#include <vector>
#include <array>
#include <list>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <queue>
#include <deque>
#include <functional>
#include <algorithm>
#include <cmath>
#include <climits>
#include <cfloat>
#include <cassert>

using namespace std;

typedef long long ll;
typedef long double real;
typedef pair<int, int> ii;

const real PI = acos((real)-1);
const ll MOD = 1000000007;

void ioFromFile(string inputFileName = "input.txt",
	string outputFileName = "output.txt") {
	ifstream* fin = new ifstream(inputFileName);
	ofstream* fout = new ofstream(outputFileName);
	cin.rdbuf(fin->rdbuf());
	cout.rdbuf(fout->rdbuf());
}

int read() { int x; scanf("%d", &x); return x; }
void write(int x) { printf("%d ", x); }
//---------------------------------------------------

const char MINUS = '*';
const char PLUS = '+';

const int N = 1 << 9;

int n;
int at;
char m[N][N];

void f(int y, int l){
	if (l < 4) return;

	for (int x = 0; x < n; x++){
		m[at][x] = m[y][x];
	}
	for (int s = 0; s < n; s += l){
		for (int x = s + l / 4; x < s + l / 2; x++){
			if (m[at][x] == PLUS) m[at][x] = MINUS;
			else m[at][x] = PLUS;
		}
		for (int x = s + 3 * l / 4; x < s + l; x++){
			if (m[at][x] == PLUS) m[at][x] = MINUS;
			else m[at][x] = PLUS;
		}
	}
	at++;
	f(at - 1, l / 2);

	for (int x = 0; x < n; x++){
		m[at][x] = m[y][x];
	}
	for (int s = 0; s < n; s += l){
		for (int x = s; x < s + l / 4; x++){
			if (m[at][x] == PLUS) m[at][x] = MINUS;
			else m[at][x] = PLUS;
		}
		for (int x = s + 3 * l / 4; x < s + l; x++){
			if (m[at][x] == PLUS) m[at][x] = MINUS;
			else m[at][x] = PLUS;
		}
	}
	at++;
	f(at - 1, l / 2);
}

int main(){
	n = 1 << read();

	for (int i = 0; i < n; i++){
		m[0][i] = PLUS;
		m[1][i] = PLUS;
	}
	for (int i = 0; i < n / 2; i++){
		m[1][i] = MINUS;
	}

	at = 2;
	f(1, n);

	for (int y = 0; y < n; y++){
		for (int x = 0; x < n; x++){
			printf("%c", m[y][x]);
		}
		printf("\n");
	}

	return 0;
}

/*

*/


#include <stdio.h>
#include <iostream>
#include <fstream>
#include <iomanip>
#include <string>
#include <cstring>
#include <cctype>
#include <vector>
#include <array>
#include <list>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <queue>
#include <deque>
#include <functional>
#include <algorithm>
#include <cmath>
#include <climits>
#include <cfloat>
#include <cassert>

using namespace std;

typedef long long ll;
typedef long double real;
typedef pair<int, int> ii;

const real PI = acos((real)-1);
const ll MOD = 1000000007;

void ioFromFile(string inputFileName = "input.txt",
	string outputFileName = "output.txt") {
	ifstream* fin = new ifstream(inputFileName);
	ofstream* fout = new ofstream(outputFileName);
	cin.rdbuf(fin->rdbuf());
	cout.rdbuf(fout->rdbuf());
}

int read() { int x; scanf("%d", &x); return x; }
void write(int x) { printf("%d ", x); }
//---------------------------------------------------

const char MINUS = '-';
const char PLUS = '+';

const int N = 1 << 9;

int n;
int at;
char m[N][N];

void f(int y, int s, int e){
	int l = e - s;
	if (l < 4) return;

	for (int x = 0; x < n; x++){
		m[at][x] = m[y][x];
	}
	for (int x = s + l / 4; x < s + l / 2; x++){
		if (m[at][x] == PLUS) m[at][x] = MINUS;
		else m[at][x] = PLUS;
	}
	for (int x = s + 3 * l / 4; x < s + l; x++){
		if (m[at][x] == PLUS) m[at][x] = MINUS;
		else m[at][x] = PLUS;
	}
	at++;
	f(at - 1, s, s + l / 2);

	for (int x = 0; x < n; x++){
		m[at][x] = m[y][x];
	}
	for (int x = s; x < s + l / 4; x++){
		if (m[at][x] == PLUS) m[at][x] = MINUS;
		else m[at][x] = PLUS;
	}
	for (int x = s + 3 * l / 4; x < s + l; x++){
		if (m[at][x] == PLUS) m[at][x] = MINUS;
		else m[at][x] = PLUS;
	}
	at++;
	f(at - 1, s, s + l / 2);
}

int main(){
	n = 1 << read();

	for (int i = 0; i < n; i++){
		m[0][i] = PLUS;
		m[1][i] = PLUS;
	}
	for (int i = 0; i < n / 2; i++){
		m[1][i] = MINUS;
	}

	at = 2;
	f(1, 0, n);

	for (int y = 0; y < n; y++){
		for (int x = 0; x < n; x++){
			printf("%c", m[y][x]);
		}
		printf("\n");
	}

	return 0;
}

/*

*/


#include <stdio.h>
#include <iostream>
#include <fstream>
#include <iomanip>
#include <string>
#include <cstring>
#include <cctype>
#include <vector>
#include <array>
#include <list>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <queue>
#include <deque>
#include <functional>
#include <algorithm>
#include <cmath>
#include <climits>
#include <cfloat>
#include <cassert>

using namespace std;

typedef long long ll;
typedef long double real;
typedef pair<int, int> ii;

const real PI = acos((real)-1);
const ll MOD = 1000000007;

void ioFromFile(string inputFileName = "input.txt",
	string outputFileName = "output.txt") {
	ifstream* fin = new ifstream(inputFileName);
	ofstream* fout = new ofstream(outputFileName);
	cin.rdbuf(fin->rdbuf());
	cout.rdbuf(fout->rdbuf());
}

int read() { int x; scanf("%d", &x); return x; }
void write(int x) { printf("%d ", x); }
//---------------------------------------------------

int main(){
	int n = read();
	vector<int> res(1 << n);
	res[0] = (1 << (1 << n)) - 1;

	for (int y = 1; y < (1 << n); y++){
		res[y] = res[y - 1] - 1;
		while (true){
			bool ok = true;
			for (int i = 0; i < y; i++){
				int xr = res[y] ^ res[i];
				int xrt = 0;
				for (int j = 0; j < (1 << n); j++){
					if (xr & (1 << j)) xrt++;
					else xrt--;
				}
				if (xrt != 0){
					ok = false;
					break;
				}
			}
			if (ok) break;
			res[y]--;
		}
	}

	for (int x : res){
		for (int i = 0; i < (1 << n); i++){
			if (x & (1 << i)){
				printf("+");
			}
			else{
				printf("*");
			}
		}
		printf("\n");
	}

	return 0;
}

/*

*/


#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
using namespace std;

int main()
{
	int k;
	scanf("%d", &k);
	int sum = 1;
	for(int i = 1; i <= k; ++i)
		sum *= 2;
	vector<int> vb[sum+1];
	vector<int> vmp;
	int half = sum / 2;
	for(int i = 1; i <= sum; ++i)
	{
		vb[1].push_back(1);
		if(i <= half)
			vb[2].push_back(1);
		else
			vb[2].push_back(-1);
	}
	/*for(int i = 1; i <= sum; ++i)
	{
		for(int j = 0; j < sum; ++j)
			cout << vb[i][j] << " ";
		cout << endl;
	}*/
	for(int i = 3; i <= sum; ++i)
	{
		vb[i].push_back(vb[i-1][sum-1]);
		for(int j = 0; j < sum-1; ++j)
		{
			vb[i].push_back(vb[i-1][j]);
			//cout << "a" << endl;
		}
	}
	for(int i = 1; i <= sum; ++i)
	{
		for(int j = 0; j < sum; ++j)
		{
			if(vb[i][j] == 1)
				printf("+");
			else
				printf("*");
		}
		cout << endl;
	}
	return 0;
}


#include <iostream>
#include <cstdio>
#include <algorithm>
using namespace std;

#define MAX 10010

bool paint[MAX][MAX];

void display(int k)
{
	int sum = 1;
	for(int i = 1; i <= k; ++i)
		sum *= 2;
	for(int i = 1; i <= sum; ++i)
	{
		for(int j = 1; j <= sum; ++j)
		{
			if(paint[i][j])
				printf("+");
			else
				printf("*");
		}
		printf("\n");
	}
}

void draw(int sign, int k)
{
	for(int i = 1; i <= sign; ++i)
	{
		for(int j = sign+1; j <= sign*2; ++j)
		{
			if(i <= sign/2)
				paint[i][j] = !paint[i][j-sign];
			else
				paint[i][j] = paint[i][j-sign];
		}
	}
	for(int i = sign+1; i <= sign*2; ++i)
	{
		for(int j = 1; j <= sign; ++j)
			paint[i][j] = paint[i-sign][j];
	}
	for(int i = sign+1; i <= sign*2; ++i)
	{
		for(int j = sign+1; j <= sign*2; ++j)
		{
			if(i <= 3*sign/2)
				paint[i][j] = paint[i-sign][j-sign];
			else
				paint[i][j] = !paint[i-sign][j-sign];
		}
	}
	//cout << sign << endl;
	if(sign == k)
		return;
	else
		draw(sign*2, k);
}

int main()
{
	//freopen("debug\\in.txt", "r", stdin);
	//freopen("CON", "w", stdout);
	int n;
	while(scanf("%d", &n) != EOF)
	{
		for(int i = 0; i < MAX; ++i)
		{
			for(int j = 0; j < MAX; ++j)
				paint[i][j] = ' ';
		}
		paint[1][1] = paint[1][2] = paint[2][1] = 1;
		paint[2][2] = 0;
		int sum = 1;
		for(int i = 1; i <= n; ++i)
			sum *= 2;
		if(n >= 2)
			draw(2, sum);
		display(n);
	}
	return 0;
}


#include <stdio.h>
#include <vector>
#include <cmath>
using namespace std;

typedef long long LL;

int main() {
	int k;
	scanf("%d", &k);
	int size = pow(2, k);
	for (int i = 0; i < size; ++i)
		printf("+");
	printf("\n");

	vector<bool> v(size, false), v2(size);
	for (int i = size/2; i < size; ++i)
		v[i] = true;

	for (int i = 1; i < size; ++i) {
		for (int j = 0; j < size; ++j) {
			if (v[j])
				printf("+");
			else
				printf("*");
			v2[(j+1)%size] = v[j];
		}
		v = v2;
		printf("\n");
	}

	return 0;
}