#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, i, f;
  string s, s1, s2;
  while (cin >> n >> s) {
    for (i = 0; i < n; i++) cin >> s1;
    if (n % 2 == 0)
      cout << "home" << endl;
    else
      cout << "contest" << endl;
  }
  return 0;
}
