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