https://ideone.com/rPL1FD


# your code goes here
def solution(n):
  i = 0
  while i < n * 2 - 1:
    c = n - abs((i + 1) - n)
    w = 'D' if c % 2 == 0 else 'd'
    print(w * c)
    i += 1

while True:
  try:
    solution(int(input()))
    print()
  except:
    break


6줄이면 되는고만