import 'dart:io';
void main() {
pattern(-2);
}
void pattern(int n) {
if(n<3 || n%2 == 0){
print("Kindly Enter Valid Number");
return;
}
print("working");
String pattern = " " * (n-1);
int a =( n~/2 +1);
print("$a");
String fronPattern1 = "";
String starPattern = "*" * (n-1);
for(int i=0;i<n+2;i++){
fronPattern1 = "";
if(i==(n+2-1)){
// print(starPattern);
pattern = starPattern;
}
if(a==i){
fronPattern1 = "*"*n;
}
if(i==0){
fronPattern1 = "*"*(n+2);
}
// else{
// fronPattern1 = "";
// }
// else{
// print(pattern);}
print("${pattern}e${fronPattern1}");
// for(int j= 0; j<n+2;j++){
// print("${pattern}e");
// }
}
}
aW1wb3J0ICdkYXJ0OmlvJzsKIAp2b2lkIG1haW4oKSB7CglwYXR0ZXJuKC0yKTsKCQoKfQp2b2lkIHBhdHRlcm4oaW50IG4pIHsKCWlmKG48MyB8fCBuJTIgPT0gMCl7CgkJcHJpbnQoIktpbmRseSBFbnRlciBWYWxpZCBOdW1iZXIiKTsKCQlyZXR1cm47Cgl9CglwcmludCgid29ya2luZyIpOwoJU3RyaW5nIHBhdHRlcm4gPSAiICIgKiAobi0xKTsKCWludCBhID0oIG5+LzIgKzEpOwoJcHJpbnQoIiRhIik7CglTdHJpbmcgZnJvblBhdHRlcm4xID0gIiI7CglTdHJpbmcgc3RhclBhdHRlcm4gPSAiKiIgKiAobi0xKTsKCWZvcihpbnQgaT0wO2k8bisyO2krKyl7CgkJCWZyb25QYXR0ZXJuMSA9ICIiOwoKCQkKCQlpZihpPT0obisyLTEpKXsKCS8vIHByaW50KHN0YXJQYXR0ZXJuKTsKCXBhdHRlcm4gPSBzdGFyUGF0dGVybjsKCQkJCgkJfQoJCWlmKGE9PWkpewoJCQlmcm9uUGF0dGVybjEgPSAiKiIqbjsKCQl9CgkJCQoJCQoJCWlmKGk9PTApewoJCQlmcm9uUGF0dGVybjEgPSAiKiIqKG4rMik7CgkJfQoJCS8vIGVsc2V7CgkJLy8gCWZyb25QYXR0ZXJuMSA9ICIiOwoJCS8vIH0KCQkvLyBlbHNlewoJCS8vIAkJcHJpbnQocGF0dGVybik7fQoJCQkJCXByaW50KCIke3BhdHRlcm59ZSR7ZnJvblBhdHRlcm4xfSIpOwoJCQoJCQoJCS8vIGZvcihpbnQgaj0gMDsgajxuKzI7aisrKXsKCQkJLy8gcHJpbnQoIiR7cGF0dGVybn1lIik7CgkJLy8gfQoJfQoJCn0=