#include <bits/stdc++.h>

using namespace std;

#define REP(i,a,b) for(int i=a;i<(int)b;i++)
#define rep(i,n) REP(i,0,n)
#define all(c) (c).begin(), (c).end()
#define zero(a) memset(a, 0, sizeof a)
#define minus(a) memset(a, -1, sizeof a)
#define watch(a) { cout << #a << " = " << a << endl; }
template<class T1, class T2> inline bool minimize(T1 &a, T2 b) { return b < a && (a = b, 1); }
template<class T1, class T2> inline bool maximize(T1 &a, T2 b) { return a < b && (a = b, 1); }

typedef long long ll;
int const inf = 1<<29;

constexpr long long to_int64(char x) {
  return (long long)x;
}
 
template<class T> struct RollingHash {
   
  const array<int, 3> mods = {{int(1e9+7), int(1e9+9), int(1234567891)}};
  const array<int, 3> Ks = {{1007, 1009, 1013}};
  const int ModsSize = mods.size();
 
  vector<T> S;
  vector<vector<long long>> hash;
  vector<vector<long long>> pow_table;
 
  void construct() {
    hash.resize(ModsSize);
    int n = S.size();
    rep(i, ModsSize) hash[i].resize(n+1);
    rep(i, ModsSize) {
      for(int j=n-1; j>=0; j--) {
        hash[i][j] = hash[i][j+1] * Ks[i];
        hash[i][j] += to_int64(S[j]);
        hash[i][j] %= mods[i];
      }
    }
 
    pow_table.resize(ModsSize);
    rep(i, ModsSize) pow_table[i].resize(n+1);
 
    rep(i, ModsSize) {
      pow_table[i][0] = 1;
      REP(j, 1, n+1) {
        pow_table[i][j] = (pow_table[i][j-1] * Ks[i]) % mods[i];
      }
    }
  }
 
  RollingHash(vector<T> const& S) {
    this->S = S;
    construct();
  }
 
  RollingHash(string const& S) {
    int n = S.size();
    rep(i, n) { this->S.push_back(S[i]); }
    construct();
  }
 
  long long get_hash(int t, int start, int end) const {
    auto r = hash[t][start] - hash[t][end] * pow_table[t][end - start];
    r %= mods[t];
    if(r < 0) { r += mods[t]; }
    return r;
  }
 
  // テ」ツδ湘」ツδε」ツつキテ」ツδ・テ・ツ?、テ」ツ?古・ツ?ィテ」ツ?ヲテ」ツ?ョMODテ」ツ?ァテ、ツクツ?ィツ?エテ」ツ?凖」ツつ凝」ツ?凝」ツ?ゥテ」ツ??」ツ?凝」ツつ津・ツ按、テ・ツョツ堙」ツ?凖」ツつ?
  bool same(int a_start, int a_end, int b_start, int b_end) const { // not verified
    int const len = a_end - a_start;
    if(len != b_end - b_start) { return false; }
    rep(i, ModsSize) {
      if(get_hash(i, a_start, a_end) != get_hash(i, b_start, b_end)) { return false; }
    }
    return true;
  }
 
  // テ、ツサツ姪」ツ?ョテヲツ鳴?・ツュツ療・ツ按療」ツ?ョテゥツδィテ・ツ按?ヲツ鳴?・ツュツ療・ツ按療」ツ?ィテ」ツ?ョテ、ツクツ?ィツ?エテ・ツ按、テ・ツョツ堙」ツつ津」ツ?凖」ツつ?
  bool same(int a_start, int a_end, int b_start, int b_end, shared_ptr<RollingHash<T>> const& rh) const {
    if(rh == nullptr) { return same(a_start, a_end, b_start, b_end); }
    int const len = a_end - a_start;
    if(len != b_end - b_start) { return false; }
    rep(i, ModsSize) {
      if(get_hash(i, a_start, a_end) != rh->get_hash(i, b_start, b_end)) { return false; }
    }
    return true;
  }
 
  // ティツセツ榲ヲツ崢クテゥツ??・ツ、ツァテ・ツーツ湘・ツ按、テ・ツョツ?
  bool compare(int a_start, int a_end, int b_start, int b_end, shared_ptr<RollingHash<T>> rh = nullptr) const {  // not verified
    int a_len = a_end - a_start;
    int b_len = b_end - b_start;
 
    int len = min(a_len, b_len);
    int max_len = len + 1;
    int min_len = 0;
 
    // テ」ツ?ゥテ」ツ?禿」ツ?セテ」ツ?ァテ、ツクツ?ィツ?エテ」ツ?凖」ツつ凝」ツ?凝」ツつ津、ツコツ古・ツ按?ヲツ篠「テァツエツ「テ」ツ?ァティツェツソテ」ツ?ケテ」ツつ?
    while(min_len + 1 < max_len) {
      int next_len = (min_len + max_len) / 2;
      if(same(a_start, a_start + next_len, b_start, b_start + next_len, rh)) {
        min_len = next_len;
      }
      else {
        max_len = next_len;
      }
    }
 
    if(a_start + min_len == a_end) {
      if(b_start + min_len == b_end) { return 0; }
      else { return -1; }
    }
    else {
      if(b_start + min_len == b_end) { return 1; }
      else { return S[a_start + min_len] == S[b_start + min_len]; }
    }
 
  }
 
};

char s[1000010];

int main() {

  scanf("%s", s);
  string S = s;

  bool ok = 0;

  int N = S.size();

  RollingHash<char> rh(S);

  string ans;

  REP(Asize, 1, N - Asize) {
    int centAidx, Bsize;

    if(N <= 3 * Asize) continue;
    if((N - 3 * Asize) % 2) continue;
    centAidx = (N - 3 * Asize) / 2 + Asize;
    Bsize = centAidx - Asize;

    if(3 * Asize + 2 * Bsize != N) continue;
    if(!rh.same(0, Asize, N - Asize, N)) continue;    
    if(!rh.same(0, Asize, Asize + Bsize, centAidx + Asize)) continue;
    if(!rh.same(Asize, Asize + Bsize, Asize * 2 + Bsize, (Asize + Bsize) * 2)) continue;
    ans = "Love " + string(S.begin(), S.begin() + Asize) + string(S.begin() + Asize, S.begin() + Asize + Bsize) + "!";
    ok = 1;
    break;
  }
  
  if(!ok) {
    cout << "mitomerarenaiWA" << endl;
  }
  else {
    for(int Asize = N - 1; Asize >= 1; Asize --) {
      int centAidx, Bsize;

      if(N <= 3 * Asize) continue;
      if((N - 3 * Asize) % 2) continue;
      centAidx = (N - 3 * Asize) / 2 + Asize;
      Bsize = centAidx - Asize;
      if(3 * Asize + 2 * Bsize != N) continue;
      if(!rh.same(0, Asize, N - Asize, N)) continue;    
      if(!rh.same(0, Asize, Asize + Bsize, centAidx + Asize)) continue;
      if(!rh.same(Asize, Asize + Bsize, Asize * 2 + Bsize, (Asize + Bsize) * 2)) continue;
      string cand = "Love " + string(S.begin(), S.begin() + Asize) + string(S.begin() + Asize, S.begin() + Asize + Bsize) + "!";
      if(cand.size() < ans.size()) {
        ans = cand;
      }
      break;
    }
    cout << ans << endl;
  }

  return 0;
}

Measured memory_bytes: 53956