#include<iostream>
#include<string>
#include<iomanip>
using namespace std;
#include<string>
#include<iomanip>
using namespace std;
void Fun(int n,char c)
{
int count=1;
int nleft;
while((2*count*count-1)<=n)
{
count++;
}
count-=1;
nleft=n-(2*count*count-1);
for(int i=count; i>=1;i--)
{
for(int j=count-i; j>0; j--)
{
cout<<" ";
}
for(int j=2*i-1; j>0; j--)
{
cout<<c;
}
cout<<endl;
}
for(int i=2; i<=count; i++)
{
for(int j=count-i; j>0; j--)
{
cout<<" ";
}
for(int j=2*i-1; j>0;j--)
{
cout<<c;
}
cout<<endl;
}
cout<<nleft;
}
{
int count=1;
int nleft;
while((2*count*count-1)<=n)
{
count++;
}
count-=1;
nleft=n-(2*count*count-1);
for(int i=count; i>=1;i--)
{
for(int j=count-i; j>0; j--)
{
cout<<" ";
}
for(int j=2*i-1; j>0; j--)
{
cout<<c;
}
cout<<endl;
}
for(int i=2; i<=count; i++)
{
for(int j=count-i; j>0; j--)
{
cout<<" ";
}
for(int j=2*i-1; j>0;j--)
{
cout<<c;
}
cout<<endl;
}
cout<<nleft;
}
int main()
{
int N;
char C;
cin>>N>>C;
Fun(N,C);
return 0;
}
{
int N;
char C;
cin>>N>>C;
Fun(N,C);
return 0;
}