원래 쓰레기같던 코드를



i,a=1,int(input())
while i<=2*a-1:
    print("dD"[i&1]*(a*2-i if i>a else i))
i+=1

이렇게 줄였다


while문 쓰는거 까지 만족했음