#include #include #pragma GCC target ("avx") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") using namespace std; using namespace atcoder; using ll=long long; #define rep(i,a,b) for(it i=(it)(a);i<=(it)b;i++) #define nrep(i,a,b) for(it i=(it)(a);i>=(it)b;i--) #define all(v) v.begin(), v.end() #define rall(v) v.rbegin(), v.rend() #define moda 998244353LL #define modb 1000000007LL #define gyaku 166374059LL #define dai 2500000000000000000LL #define tyu 2500000000 #define giri 1000000000 #define en 3.14159265358979 #define endl '\n' #define sho -dai #define eps 1e-14 #define yn(x) cout<<(x ? "Yes\n":"No\n"); #define YN(x) cout<<(x ? "YES\n":"NO\n"); #define cou(x) cout<>x; using it=long long; using un=unsigned long long; using db=long double; using st=string; using ch=char; using bo=bool; using P=pair; using ip=pair; using mint=modint; using mints=modint998244353; using minto=modint1000000007; using vi=vector; using ivi=vector; using vd=vector; using vs=vector; using vc=vector; using vb=vector; using vp=vector

; using ivp=vector; using vm=vector; using vms=vector; using vmo=vector; using sp=set

; using isp=set; using ss=set; using sc=set; using si=set; using isi=set; using svi=set; using vvi=vector; using ivvi=vector; using vvd=vector; using vvs=vector; using vvb=vector; using vvc=vector; using vvp=vector; using ivvp=vector; using vvm=vector; using vvms=vector; using vvmo=vector; using vsi=vector; using ivsi=vector; using vsp=vector; using ivsp=vector; using vvsi=vector; using ivvsi=vector; using vvsp=vector; using ivvsp=vector; using vvvi=vector; using ivvvi=vector; using vvvd=vector; using vvvm=vector; using vvvvi=vector; using ivvvvi=vector; int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); int n;cin>>n; ivvi g(110); rep(i,1,n){ int k;cin>>k; rep(j,0,k-1){ int a;cin>>a; g[j].push_back(a); } } rep(i,0,99) for(int j:g[i])cout<