void process(int dataId) { int n; cin >> n; for(int i=0;i<30;i++) for(int j=0;j<30;j++) links[i][j].clear(); output.clear(); for(int i=0;i<n;i++) { string tmp; cin >> tmp; int c1 = tmp[0] - 'a'; int c2 = *(tmp.rbegin()) - 'a'; links[c1][c2].pb(tmp); } }
/** Empty the cache. */ void clear() { map_.clear(); list_.clear(); size_ = 0; }