I was doing questions from educational codeforces round 56 where I was unable to get the problem 1093E Intersection of permutation problem link (https://codeforces.me/contest/1093/problem/E). I am not able to get intuition about this problem please help. I read the editorial but I am still not able to understand that why that solution is working and how is that working. Please share your approach to the problem, if any concepts needed to solve the problem please mention it too. Thanks.