#include <bits/stdc++.h>
using namespace std;
class TaskA {
 public:
  void solve(std::istream& in, std::ostream& out) {
    ios::sync_with_stdio(false);
    int n;
    string home, res;
    in >> n;
    if (n % 2 == 0) {
      res = "home";
    } else {
      res = "contest";
    }
    out << res << endl;
  }
};
int main() {
  TaskA solver;
  std::istream& in(std::cin);
  std::ostream& out(std::cout);
  solver.solve(in, out);
  return 0;
}
