#include <bits/stdc++.h>
const int N = 100100;
const int mod = 1e6;
using namespace std;
int n;
string s;
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n >> s;
  if (n % 2) {
    cout << "contest";
  } else {
    cout << "home";
  }
}
