Codeforces FF div 2, A and B, AC.