/* (C) WhiZTiM 2013 */
#include <iostream>
#include <string>
#include <cstring>
#include <vector>
using namespace std;
typedef string::size_type szT;
typedef vector<string> VEC_string;
void strip_common_characters(string& A, string& B)
{
//choose the shortest string to save iteration time
string& S1 = A.size() <= B.size() ? A : B; //by reference!
string& S2 = A.size() > B.size() ? A : B; //by reference!
szT i = 0;
while(i < S1.size())
{
bool found = false;
szT lc = S2.find(S1[i]);
if(lc != string::npos) found = true;
else
{
lc = S2.find(tolower(S1[i]));
if(lc != string::npos) found = true;
}
if(found)
{
S1.erase(i, 1);
S2.erase(lc,1);
continue;
}
++i;
}
}
void instantiateMap(VEC_string& mp)
{
mp.push_back("Friends");
mp.push_back("Lovers");
mp.push_back("Admirers");
mp.push_back("Married");
mp.push_back("Enemies");
mp.push_back("Sisters");
}
void run()
{
string s1, s2, s3, s4;
getline(cin, s1);
getline(cin, s2);
s3 = s1; s4 = s2;
VEC_string mp;
instantiateMap(mp);
strip_common_characters(s1, s2);
unsigned k = s1.size() + s2.size();
k = (k - 1) < 0 ? 0 : ((k - 1) % mp.size());
cout << s3 << " and " << s4 << " are " << mp[k] << endl;
}
int main(int argc, char* argv[])
{
run();
return 0;
}
LyogKEMpIFdoaVpUaU0gMjAxMyAqLwojaW5jbHVkZSA8aW9zdHJlYW0+CiNpbmNsdWRlIDxzdHJpbmc+CiNpbmNsdWRlIDxjc3RyaW5nPgojaW5jbHVkZSA8dmVjdG9yPgoKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKdHlwZWRlZiBzdHJpbmc6OnNpemVfdHlwZSBzelQ7CnR5cGVkZWYgdmVjdG9yPHN0cmluZz4gVkVDX3N0cmluZzsKCnZvaWQgc3RyaXBfY29tbW9uX2NoYXJhY3RlcnMoc3RyaW5nJiBBLCBzdHJpbmcmIEIpCnsKICAgIC8vY2hvb3NlIHRoZSBzaG9ydGVzdCBzdHJpbmcgdG8gc2F2ZSBpdGVyYXRpb24gdGltZQoJc3RyaW5nJiBTMSA9IEEuc2l6ZS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