#!/usr/bin/perl
# your code goes here

# short version: $_="I xe tx "x$_;s/tx $/it./;s/x/++$.%4?hat:lov/ge

$_ = "I xe tx " x <>;

s/tx $/it./;

s/x/ ++$. % 4 ? hat : lov /ge;

print