n = int(input()) s = "Hello world!\n" print(s * (n - 1)) print(s[::-1])