#include <bits/stdc++.h>
using namespace std;
int N;
int main(void) {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> N;
  if (N % 2)
    cout << "contest" << endl;
  else
    cout << "home" << endl;
}
