#include <bits/stdc++.h>
using namespace std;
string toBinary(int n) {
  string str;
  while (n) {
    str.push_back(n % 2 + '0');
    n /= 2;
  }
  int ln = str.size();
  for (int i = 0; i < ln; i++) {
    if (str[i] == '1') {
      str = str.substr(i, ln);
      break;
    }
  }
  return str;
}
int main() {
  int n;
  scanf("%d", &n);
  string str;
  cin >> str;
  string line, a, b;
  for (int i = 0; i < n; i++) {
    cin >> line;
  }
  if (n % 2 == 0)
    cout << "home" << endl;
  else
    cout << "contest" << endl;
}
