#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int a, n, i;
  string s, x;
  cin >> n >> s;
  a = n;
  while (a--) {
    cin >> x;
  }
  if (n % 2 == 0)
    cout << "home\n";
  else
    cout << "contest\n";
}
