UVa253 - Cube painting
//253 - Cube painting
#include<iostream>
#include<cstring>
#include<algorithm>
using namespace std;
int main(){
string s1;
int ans[2][3];
while(cin>>s1){
for(int i = 0; i < 3; i++){
ans[0][i] = s1[i]+s1[5-i];
ans[1][i] = s1[6+i]+s1[6+5-i];
}
sort(ans[0],ans[0]+3);
sort(ans[1],ans[1]+3);
int is = 1;
for(int i = 0; i < 3; i++)
if(ans[0][i] != ans[1][i]) is = 0;
is==1? cout<<"TRUE\n": cout<<"FALSE\n";
}
return 0;
}
/*已AC
rbgggrrggbgr
*/