#include <bits/stdc++.h>

#define FOR(i,a,b) for(int i= (a); i<((int)b); ++i)
#define RFOR(i,a) for(int i=(a); i >= 0; --i)
#define FOE(i,a) for(auto i : a)
#define ALL(c) (c).begin(), (c).end()
#define RALL(c) (c).rbegin(), (c).rend()
#define DUMP(x)  cerr << #x << " = " << (x) << endl;
#define SUM(x) std::accumulate(ALL(x), 0LL)
#define MIN(v) *std::min_element(v.begin(), v.end())
#define MAX(v) *std::max_element(v.begin(), v.end())
#define EXIST(v,x) (std::find(v.begin(), v.end(), x) != v.end())
#define BIT(n) (1LL<<(n))
#define UNIQUE(v) v.erase(unique(v.begin(), v.end()), v.end());

typedef long long LL;
typedef unsigned long long ULL;
template<typename T> using V = std::vector<T>;
template<typename T> using VV = std::vector<std::vector<T>>;
template<typename T> using VVV = std::vector<std::vector<std::vector<T>>>;
template<class T> inline T ceil(T a, T b) { return (a + b - 1) / b; }
template<class T> inline void print(T x) { std::cout << x << std::endl; }
template<class T> inline bool inside(T y, T x, T H, T W) {return 0 <= y and y < H and 0 <= x and x < W; }
inline double distance(double y1, double x1, double y2, double x2) { return sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)); }

const int INF = 1L << 30;
const double EPS = 1e-9;
const std::string YES = "YES", Yes = "Yes", NO = "NO", No = "No";
const std::vector<int> dy = { 0, 1, 0, -1 }, dx = { 1, 0, -1, 0 };    // 4近傍（右, 下, 左, 上）

using namespace std;


// 部分文字列のhash値を計算
class SubstringHash {
    const int N;
    vector<unsigned long long> powb;
    vector<unsigned long long> shash;
    const unsigned long long b = 1000000007;

public:
    SubstringHash(string s) : N(s.size()) {
        this->powb.resize(s.size() + 10);
        this->shash.resize(s.size() + 10);
        powb[0] = 1;
        FOR(i, 0, s.size()) {
            powb[i + 1] = powb[i] * b;
            shash[i + 1] = shash[i] * b + s[i];
        }
    }

    // s[left, right)のhash値
    unsigned long long hash(int left, int right) {
        assert(0 <= left and 0 <= right and left <= right and right <= N);

        return shash[right] - shash[left] * powb[right - left];
    }
};

int main() {
    ios::sync_with_stdio(0);
    cin.tie(0);

    string S;
    cin >> S;
    int N = S.size();

    SubstringHash sh(S);

    int ans_a_size = 1000000, ans_b_size = 1000000;
    FOR(i, 1, N) {
        int a_size = i;
        int n = N - a_size * 3;
        if (n < 2 or n % 2 != 0) {
            continue;
        }
        int b_size = n / 2;

        ULL a1 = sh.hash(0, a_size);
        ULL b1 = sh.hash(a_size, a_size + b_size);
        ULL a2 = sh.hash(a_size + b_size, a_size + b_size + a_size);
        ULL b2 = sh.hash(a_size + b_size + a_size, a_size + b_size + a_size + b_size);
        ULL a3 = sh.hash(a_size + b_size + a_size + b_size, N);

        if (a1 == a2 and a2 == a3 and b1 == b2) {
            if (a_size + b_size < ans_a_size + ans_b_size) {
                ans_a_size = a_size;
                ans_b_size = b_size;
            }
        }
    }

    if (ans_a_size != 1000000 and ans_b_size != 1000000) {
        string A = S.substr(0, ans_a_size);
        string B = S.substr(ans_a_size, ans_b_size);
        print("Love " + A + B + "!");
    }
    else {
        print("mitomerarenaiWA");
    }
    return 0;
}


Measured memory_bytes: 20588