func_code_string: #include <bits/stdc++.h>   using namespace std;   string s1[10], s2[10], name[10], score[10];   map<string, int> mp;   int a[10][10];   bool better(int x, int y) {     int i;     int px = 0, py = 0, mx = 0, sx = 0, sy = 0, my = 0;     for (i = 0; i < 4; i++) {       if (i != x) {         if (a[x][i] > a[i][x])           sx += 3;         else if (a[x][i] == a[i][x])           sx++;         px += a[x][i];         mx += a[i][x];       }     }     for (i = 0; i < 4; i++) {       if (i != y) {         if (a[y][i] > a[i][y])           sy += 3;         else if (a[y][i] == a[i][y])           sy++;         my += a[i][y];         py += a[y][i];       }     }     if (sx != sy) return (sx > sy);     if (px - mx != py - my) return (px - mx > py - my);     if (px != py) return (px > py);     return (x < y);   }   bool check(int x, int y) {     int i, c;     int b = mp[ BERLAND ];     for (i = 0; i < 4; i++)       if (i != b && a[b][i] == -1) c = i;     a[b][c] = x;     a[c][b] = y;     int rank = 1;     for (i = 0; i < 4; i++) {       if (i != b && better(i, b)) rank++;     }     a[b][c] = a[c][b] = -1;     return (rank <= 2);   }   int main() {     int d, i, j;     for (i = 0; i < 5; i++) cin >> s1[i] >> s2[i] >> score[i];     for (i = 0; i < 5; i++) mp[s1[i]] = mp[s2[i]] = 0;     i = 0;     for (__typeof((mp).begin()) itr = (mp).begin(); itr != (mp).end(); itr++) {       (itr->second) = i;       name[i] = (itr->first);       i++;     }     for (i = 0; i < 4; i++)       for (j = 0; j < 4; j++) a[i][j] = -1;     for (i = 0; i < 5; i++) {       int x = mp[s1[i]], y = mp[s2[i]];       for (j = 0; j < score[i].length(); j++)         if (score[i][j] ==  : ) score[i][j] =    ;       istringstream ss(score[i]);       ss >> a[x][y] >> a[y][x];     }     for (d = 1; d < 100; d++)       for (i = 0; i < 100; i++) {         j = i + d;         if (check(j, i)) {           cout << j <<  :  << i << endl;           return 0;         }       }     cout <<  IMPOSSIBLE  << endl;     return 0;   }   