Concatenation with intersection

CodeForces - 1313E