Write a constraint to generate the pattern 1234554321

Write a constraint to generate the pattern 1234554321 Can you help me for this ?