codeforces Round#177,A && B && C.