#include <bits/stdc++.h>
using namespace std;
long long read() {
  long long x = 0, f = 1, ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = (x << 1) + (x << 3) + ch - '0';
    ch = getchar();
  }
  return f * x;
}
const int maxn = 110, inf = 1000000000;
int a[maxn], n, flag[maxn];
char ch[10];
char s[maxn][10];
int main() {
  n = read();
  scanf("%s", ch);
  for (int i = (1); i <= (n); i++) scanf("%s", s[i]);
  if (n % 2 == 1)
    printf("contest\n");
  else
    printf("home\n");
  return 0;
}
