Powerful Permutation

Company: MediaNet_23july

Difficulty: medium