#include <bits/stdc++.h>
int n, j;
char st[11], st1[11];
int main() {
  scanf("%d", &n);
  scanf("%s", &st);
  for (j = 1; j <= n; j++) scanf("%s", &st1);
  if (n % 2 == 0)
    printf("home");
  else
    printf("contest");
  return 0;
}
