#include <iostream>
#include<algorithm>
using namespace std;

int main() {
	// your code goes here
	string s = "anagram",t = "nagaram";
	
	sort(s.begin(),s.end());
	sort(t.begin(),t.end());
	
	if(s==t) {
		cout<<"TRUE"<<endl;
	}
	else {
		cout<<"FALSE"<<endl;
	}
	return 0;
}