'a' and 'b' should be paired with 'x' and 'y' respectively:

abxy

abxy

axby

abxy

abxy

'a' and 'b c' should be paired with 'x' and 'y z' repectively:

a xb cy z

'a b' and 'c' should be paired with 'x y' and 'z' repectively:

a b x ycz

'a b' and 'c d' should be paired with 'w x' and 'y z' repectively:

a b w xc dy z