the Smart Beaver ABBYY come splendid problem ABBYY Cup participant this time Beaver invite contest participant check problem sort document subject Lets describe problemYouve got train set document for document know subject the subject problem integer 1 3 each number physical meaning for instance document subject 3 tradeyou download training set document follow link httpdownload4abbyycoma2x2rz2zwxbg5vywal61h76zqmtrainzip the archive contain directory name 1 2 3 Directory name 1 contain document 1st subject directory 2 contain document 2nd subject directory 3 contain document 3rd subject each document correspond exactly file directoryall document follow format line contain document identifier second line contain document subsequent line contain text document the document identifier instal problem convenient useful information participantsYou need write program indicate subject give document it guarantee document give input program correspond subject train set