Spinach Forest

Codeforces: Build Permutations