#include <bits/stdc++.h>
using namespace std;
const int oo = int(2e9) + 9;
const double eps = 1e-9;
const double pi = 3.14159265358979323846264338327950;
int main() {
  int n;
  cin >> n;
  if (n % 2 == 0)
    cout << "home\n";
  else
    cout << "contest\n";
  return 0;
}
