#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, n;
  char a[1000][10];
  cin >> n;
  cin >> a[0];
  for (i = 1; i <= n; i++) {
    cin >> a[i];
  }
  if (n % 2 == 0)
    cout << "home";
  else
    cout << "contest";
  return 0;
}
