#include using namespace std; using ll =long long; #define all(v) v.begin(),v.end() #define rep(i,a,b) for(int i=a;i=b;i--) ll INF=2e18; int main() { ios::sync_with_stdio(false); cin.tie(0); ll N;cin>>N; vector S(N); map Q; for(ll i=0;i>S[i]; sort(all(S[i])); Q[S[i]]++; } vector> vec(N,vector (0)); for(ll i=0;i0) ok=false; } if(Q[S[i]]>0) ok=false; if(ok) { cout<