#include <cstdio>
#include <cstdint>
#include <cassert>
#include <vector>
#include <algorithm>
#include <string>

#define fprintf(...) void(0)

template <intmax_t X=943681729, intmax_t MOD=1000000007>
class RollingHash {
  std::vector<intmax_t> hash;
  intmax_t offset(size_t len) const {
    intmax_t res=1;
    for (intmax_t dbl=X%MOD; len; len>>=1) {
      if (len & 1) res = res*dbl % MOD;
      dbl = dbl*dbl % MOD;
    }
    return res;
  }

public:
  RollingHash(const std::string &s): hash(s.length()+1) {
    for (size_t i=0; i<s.length(); ++i)
      hash[i+1] = (hash[i]*X+s[i]) % MOD;
  }

  intmax_t operator ()(size_t i, size_t j) const {
    // s[i..j-1]
    assert(i < j);
    intmax_t res=hash[j];
    res = (res - offset(j-i)*hash[i]) % MOD;
    if (res < 0) res += MOD;
    return res;
  }
};

using RHash=RollingHash<>;

int main() {
  char buf[1234567];
  scanf("%s", buf);
  std::string s=std::move(buf);
  RHash rh(s);

  uintmax_t aa=s.length(), bb=s.length();
  for (size_t i=1; i<s.length(); ++i) {
    size_t al=i;
    fprintf(stderr, "al: %zu\n", al);
    if (al*3 >= s.length())
      continue;
    if ((s.length()-al*3) % 2 > 0) continue;
    size_t bl=(s.length()-al*3)/2;
    fprintf(stderr, "bl: %zu\n", bl);
    assert(al+bl+al+bl+al == s.length());

    intmax_t ah1=rh(0, al);
    intmax_t bh1=rh(al, al+bl);
    intmax_t ah2=rh(al+bl, al+bl+al);
    intmax_t bh2=rh(al+bl+al, al+bl+al+bl);
    intmax_t ah3=rh(al+bl+al+bl, al+bl+al+bl+al);

    fprintf(stderr, "%zu/%zu, %jd %jd %jd %jd %jd\n",
            al, bl, ah1, bh1, ah2, bh2, ah3);

    if (!(ah1 == ah2 && ah2 == ah3 && bh1 == bh2)) continue;

    if (aa+bb > al+bl) {
      assert(al && bl);
      aa = al;
      bb = bl;
    }
  }

  if (aa == s.length()) {
    assert(bb == s.length());
    printf("mitomerarenaiWA\n");
  } else {
    assert(aa < s.length() && bb < s.length());
    printf("Love %s%s!\n", s.substr(0, aa).c_str(), s.substr(aa, bb).c_str());
  }
}

