#include <bits/stdc++.h>
using namespace std;
const long double pi = 3.14159265358979323846;
const long long mod = 1e9 + 7;
const long long N = 2e3;
const long long INF = 1e9 + 1;
long long n;
string a[N], s;
int main() {
  std::ios_base::sync_with_stdio(false);
  std::cin.tie(0);
  std::cout.tie(0);
  cin >> n >> s;
  for (long long i = 1; i <= n; ++i) {
    cin >> a[i];
  }
  if (n % 2 == 0) {
    cout << "home";
  } else {
    cout << "contest";
  }
  return 0;
}
