#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n;
  cin >> n;
  string s;
  cin >> s;
  string s1[105], s2[105];
  char c, c2;
  for (long long int i = 0; i < n; i++) {
    cin >> s1[i];
  }
  if (n & 1)
    printf("contest\n");
  else
    printf("home\n");
}
