#include <bits/stdc++.h>
using namespace std;
int N, M, W[100000];
vector<int> g[100000];
bool v[100000];
int order[100000], low[100000], ptr;
long long sum[100000], ans[100000];
vector<int> tree[100000];
void dfs(int idx, int par) {
  v[idx] = true;
  order[idx] = ptr++;
  low[idx] = order[idx];
  sum[idx] = W[idx];
  for (auto &to : g[idx]) {
    if (!v[to]) {
      dfs(to, idx);
      low[idx] = min(low[idx], low[to]);
      sum[idx] += sum[to];
      tree[idx].emplace_back(to);
    } else if (to != par) {
      low[idx] = min(low[idx], order[to]);
    }
  }
}
void dfs2(int idx, long long parcost) {
  bool art = false;
  long long all = parcost;
  if (idx == 0) {
    if (tree[idx].size() > 1) art = false;
  } else {
    for (auto &to : tree[idx]) art |= order[idx] <= low[to];
  }
  for (auto &to : tree[idx]) all += sum[to];
  if (art) {
    long long latte = parcost, malta = 0;
    for (auto &to : tree[idx]) {
      if (order[idx] <= low[to])
        malta = max(malta, sum[to]);
      else
        latte += sum[to];
    }
    ans[idx] = max(latte, malta);
  } else {
    ans[idx] = sum[0] - W[idx];
  }
  for (auto &to : tree[idx]) dfs2(to, all + W[idx] - sum[to]);
}
int main() {
  cout << 44 << endl;
  cout << 25 << endl;
  cout << 42 << endl;
  cout << 30 << endl;
  cout << 40 << endl;
  cout << 39 << endl;
  cout << 30 << endl;
  cout << 37 << endl;
  cout << 36 << endl;
}
