#include <bits/stdc++.h>
using namespace std;
const long double PI = acos(-1.0);
const int INF = 1000 * 1000 * 1000 + 7;
const long long LINF = INF * (long long)INF;
const int MAX = 100005;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  if (n % 2 == 1) {
    cout << "contest";
  } else
    cout << "home";
}
