#include <bits/stdc++.h>
using namespace std;
map<long long, long long> mp, pm;
vector<char> v;
deque<long long> p;
long long a, b, c, d, e, cnt, ans, r, n;
long double q;
string g, h;
char t, y, u;
int main() {
  cout.tie(NULL);
  cin.tie(NULL);
  ios_base::sync_with_stdio(0);
  cin >> a;
  if (a % 2 == 0)
    cout << "home";
  else
    cout << "contest";
}
