Hulk

Practice this coding question on Coding Gurukul.

Problem statement

A drama club programs a caption generator for a character called Hulk. The script consists of a requested number of alternating emotional clauses, joined into one sentence. Actors need the punctuation and spacing to be predictable because the caption is synchronised with their performance. You are implementing the sentence builder, not analysing natural language or changing the wording of the clauses. Your task Build n clauses. Clause 1 is I hate, clause 2 is I love, and the pattern alternates thereafter. Join neighbouring clauses with a single space, the word that, and another single space. After the final clause append a space followed by it. Print the complete sentence on one line. Important details There is no that after the last clause. Begin with hate even when n is even. Preserve the capital I and use single spaces without adding a final full stop. Worked example For n = 2, the clauses are I hate and I love. Joining them and adding the ending produces I hate that I love it.

Input format

One integer n.

Output format

Print the generated sentence.

Constraints

1 <= n <= 100.

Sample input

2

Sample output

I hate that I love it

Sign in to run or submit a solution in C++, Java or Python.