#include <bits/stdc++.h>
using namespace std;
int compare(const void *a, const void *b) {
  int *pa = (int *)a;
  int *pb = (int *)b;
  return (*pa) - (*pb);
}
int main() {
  int n;
  char a[400000];
  while (scanf("%d", &n) != EOF) {
    for (int i = 1; i <= n + 1; i++) scanf("%s", a);
    if (n % 2 == 1)
      printf("contest\n");
    else
      printf("home\n");
  }
}
