A
AB
ABC
ABCD
ABCDE
E
DE
CDE
BCDE
ABCDE
Code of above pattern

Code of above pattern

A
BA
CBA
DCBA
EDCBA
E
ED
EDC
EDCB
EDCBA
Code of above pattern

Code of above pattern

ABCDE
ABCD
ABC
AB
A
ABCDE
BCDE
CDE
DE
E
Code of above pattern

Code of above pattern

EDCBA
DCBA
CBA
BA
A
EDCBA
EDCB
EDC
ED
E
Code of above pattern

Code of above pattern

A
BB
CCC
DDDD
EEEEE
E
DD
CCC
BBBB
AAAAA
Code of above pattern

Code of above pattern

EEEEE
DDDD
CCC
BB
A
AAAAA
BBBB
CCC
DD
E
Code of above pattern

Code of above pattern