a = input()

for i in range(5):
    if(i<3):
        print("{:^5}".format(a*(i*2+1)))
        continue
    print("{:^5}".format(a*((-i+4)*2+1)))