#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-8;
const double pi = acos(-1.0);
int main() {
  int n;
  cin >> n;
  string s;
  for (int i = 0; i < n + 1; i++) cin >> s;
  if (n & 1)
    cout << "contest" << endl;
  else
    cout << "home" << endl;
  return 0;
}
