#include <iostream>
#include <string>
#include <typeinfo>
#include <vector>
using namespace std;

int population(const Countries& p, double x);

int main()
{
    int n;
    cin >> n;
    Countries p(n);
    for (int i = 0; i < n; ++i) {
        int np;
        cin >> p[i].name >> p[i].capital >> np;
        p[i].provs = vector<Province>(np);
        for (int j = 0; j < np; ++j) {
            cin >> p[i].provs[j].name >> p[i].provs[j].capital >> p[i].provs[j].population >> p[i].provs[j].area >> p[i].provs[j].gdp;
        }
    }
    for (double x = 0; x < 5000; x += 100) {
        cout << population(p, x) << endl;
    }
    return 0;
}
