在 Mathematica 中重新排列嵌套列表

Rearranging nested list in Mathematica

我有一个列表:
list1 = {{{3, 3, 3, 3}, {1, 1, 1, 1}, {2, 2, 2, 2}}, {{3, 3, 3, 3}, {1, 1, 1, 1}, {2, 2, 2, 2}}};
从上面的列表中,我想获得以下列表:
{{{3, 3, 3, 3, 3, 3, 3, 3}, {1, 1, 1, 1, 1, 1, 1, 1}, {2, 2, 2, 2, 2, 2, 2, 2}}}
我尝试使用 ArrayReshape,但结果列表不是我想要的:
list2 = ArrayReshape[list1, {1, 3, 8}]
{{{3, 3, 3, 3, 1, 1, 1, 1}, {2, 2, 2, 2, 3, 3, 3, 3}, {1, 1, 1, 1, 2, 2, 2, 2}}}
*编辑
所需的解决方案应该推广到所有输入都不同的列表。
**编辑
一般情况下的列表示例:
{{{a1,a2,a3},{b1,b2,b3},{c1,c2,c3}},{{d1,d2,d3},{e1,e2,e3},{f1,f2,f3}}}
期望的结果:
{{{a1,a2,a3,d1,d2,d3},{b1,b2,b3,e1,e2,e3},{c1,c2,c3,f1,f2,f3}}}

尝试

list1 = {{{3,3,3,3},{1,1,1,1},{2,2,2,2}},{{3,3,3,3},{1,1,1,1},{2,2,2,2}}}; 
f[v_]:=Table[v,{Count[Flatten[list1],v]}]
Map[f,DeleteDuplicates[Flatten[list1]]]

瞬间returns

{{3,3,3,3,3,3,3,3},{1,1,1,1,1,1,1,1},{2,2,2,2,2,2,2,2}}

编辑

有没有可能这就是您要找的东西?

list1 = {{{1,2,3,4},{5,6,7,8},{9,10,11,12}},
         {{13,14,15,16},{17,18,19,20},{21,22,23,24}}};
MapThread[Join,list1]

哪个returns

{{1,2,3,4,13,14,15,16},{5,6,7,8,17,18,19,20},{9,10,11,12,21,22,23,24}}

只是猜测