update for ural1447.cpp, MST