s = gets.chomp
r = ""

for i in 1..s.size
  next if 3 * i >= s.size || (s.size - 3 * i) % 2 != 0
  
  t = s[0...i]
  u = s[i...i+(s.size-3*i)/2]
  
  m = s.scan(/^#{t}#{u}#{t}#{u}#{t}$/)
  unless m.empty? then
    _s = t + u
    r = _s if r.size < _s.size
  end
end

if r.empty? then
  puts "mitomerarenaiWA"
else
  puts "Love #{r}!"
end