#include using namespace std; using ll=long long; int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); string X,Y,Z; cin>>X>>Y>>Z; int x=X.size(); int y=Y.size(); int z=Z.size(); set S; for(int i=1;i<=x;i++){ for(int j=1;j<=y;j++){ for(int k=1;k<=z;k++){ vector P={X.substr(0,i),Y.substr(0,j),Z.substr(0,k)}; sort(P.begin(),P.end()); do{ S.insert(P[0]+P[1]+P[2]); }while(next_permutation(P.begin(),P.end())); } } } cout<