#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  string s1;
  for (int i = 0; i < n; i++) {
    cin >> s;
  }
  if (n & 1) {
    cout << "contest";
  } else
    cout << "home";
}
