#include <bits/stdc++.h>
using namespace std;
int dp[1000], a, b, maximum;
int main() {
  int n, sch, i;
  string s, ans;
  cin >> n;
  cin >> ans;
  for (i = 0; i < n; ++i) cin >> s;
  if (n % 2 == 0)
    cout << "home";
  else
    cout << "contest";
}
