#ACSL1920S3. ACSL1920S3

ACSL1920S3

image image

SAMPLE INPUT

FF33
00CC
6090
8810
9008
F0B8
9699
8DD8
C3С3
F111

SAMPLE OUTPUT

B+~A~B
A~B
BC~D+~B~CD
AB~C+~A~B~CD
B~C~D+A~B~C~D
B~D+~A~BD+A~B~C
~B~C+BCD+B~C~D
A~C+ACD+~A~CD
AB~D+~ABD+A~BD+~A~B~D
B~D+~A~CD+~A~B~C~D