#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 123;
const int mod = 1e9 + 7;
const int INF = 1e9 + 1;
const long long INFL = 1e18 + 1;
const double eps = 1e-9;
const double pi = acos(-1.0);
string a[101];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int ind = 0;
  int n;
  string s;
  cin >> n >> s;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  if (n % 2 == 0) {
    cout << "home";
  } else
    cout << "contest";
  return 0;
}
