for i in range(1,10): print str(''.join(map(str,range(1,i+1)))[::-1]+''.join(map(str,range(2,i+1)))).center(18)