n,symbol=input().split() n=int(n) if n<7: print(symbol) print(n-1) else: li = [] space_li = [] space_num = 0 for i inrange(1, n, 2): li.append(i) if (sum(li) + sum(li[1:])) >= n: if (sum(li) + sum(li[1:])) != n: li.pop() li = (li[1:])[::-1] + li a = n - sum(li) break for i in li: if i == 1: space_li.append(space_num) space_li = space_li + (space_li[0:li.index(i)])[::-1] break space_li.append(space_num) space_num += 1 for i inrange(len(space_li)): print(space_li[i] * " ", end="") print(li[i] * symbol) print(a)