Codeforces Round #179 (Div. 2): D. Greg and Graph(Floyd)

NoSuchKey