Codeforces Round 972 Solution