#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-10, pi = acos(-1.0);
int main() {
  int T = 1, cs = 1;
  while (T--) {
    int n;
    cin >> n;
    string s;
    cin >> s;
    for (int i = 0; i < n; i++) cin >> s;
    if (n % 2)
      cout << "contest\n";
    else
      cout << "home\n";
  }
  return 0;
}
