any resemblance real championship sport accidentalThe Berland National team take local Football championship group stage Lets describe formal rule local championship team kick ball enemys goal area win game victory give 3 point team draw give 1 point defeat give 0 point group consist team team rank result games team play exactly team team place 1 2 group stage result stage championship in group stage team place define total number score point point high place if team number point follow criterion criterion list order fall priority start important difference total number score goal total number miss goal championship team high value get high place total number score goal championship team high value get high place lexicographical order team country country lexicographically small get high place the Berland team play group result 5 6 game know to exact game leave there Berand national team play team the coach ask find score XY x number goal Berland score Y number goal opponent score game fulfill follow condition X Y Berland go win game game Berland get 1st 2nd place group multiple variant choose score XY value XY minimum impossible come score choose score value y number goal Berland miss minimum