n = int(input())
print('*' * n)
print('*' n 2)
print('*' n 3)
print('*' n 4)
print('*' n 5)
print('*' n 6)
print('*' n 7)
print('*' n 8)
print('*' n 9)#include<cstdio>
#include<cstdlib>
int main(){
int n, a, score=0, combo=0;
scanf("%d", &n);
for(int i=1; i<=n; i++){
scanf("%d", &a);
if(a==1){
combo++;
score += combo;
}else if(a==0){
combo=0;
}
}
printf("%d", score);
return 0;
}