Codeforces Round 859 (Div. 4) Solution