Lucky Permutation Triple

Problem Name:
Lucky Permutation Triple
Site:CodeForces
Links:
Tags:
Problem setters: