#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string s, a, a1;
  cin >> s;
  for (int i = 1; i <= n; i++) {
    cin >> a;
  }
  n % 2 == 0 ? cout << "home" : cout << "contest";
  return 0;
}
