#include <iostream>
#include <string>
using namespace std;
int main()
{
string name;
cout<<"please input your name"<<endl;
cin>>name;
string greeting="hello, "+name+" !";
int row,col,pad1,pad2;
cout<<"please input pad1,pad2:"<<endl;
cin>>pad1>>pad2;
row=pad1*2+3;
col=greeting.size()+pad2*2+2;
int r;
for(r=0;r<row;r++)
{
string::size_type c=0;
while(c!=col)
{
if(r==pad1+1&&c==pad2+1)
{
cout<<greeting;
c+=greeting.size();
}
else
{
if(r==0||r==row-1||c==0||c==col-1)
cout<<"*";
else
cout<<" ";
c++;
}
}
cout<<endl;
}
return 0;
}