DIDO
12340

ABBA → 1001

ABCDE → 12345EDCBA → 54321

ABCDE → 10234ABCDE → 12340