#include <stdio.h>
int main(void) {
char a[4];
int c[3]={0};
for(int i=0;i<3;i++){
if(a[i]=='A')c[0]++;
else if(a[i]=='B')c[1]++;
else if(a[i]=='C')c[2]++;
}
if(c[1]==1&&c[2]==1&&c[0]==1)
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgbWFpbih2b2lkKSB7CgljaGFyIGFbNF07CglpbnQgY1szXT17MH07CglzY2FuZigiJXMiLGEpOwoJZm9yKGludCBpPTA7aTwzO2krKyl7CgoJCWlmKGFbaV09PSdBJyljWzBdKys7CgkJZWxzZSBpZihhW2ldPT0nQicpY1sxXSsrOwoJCWVsc2UgaWYoYVtpXT09J0MnKWNbMl0rKzsKCX0KCWlmKGNbMV09PTEmJmNbMl09PTEmJmNbMF09PTEpCgkJcHJpbnRmKCJZZXMiKTsKCQllbHNlIHByaW50ZigiTm8iKTsKCXJldHVybiAwOwp9Cg==