#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:100000000000")
using namespace std;
int n;
char s[20];
int main() {
  scanf("%d ", &n);
  scanf("%s\n", s);
  for (int32_t i = (0); i < (n); ++i) {
    scanf("%s\n", s);
  }
  if (n % 2 == 0) {
    printf("%s", "home\n");
  } else {
    printf("%s", "contest\n");
  }
}
