#include #include using namespace std;

bool isWildcard(string s1, string s2) { sort(s1.begin(), s1.end()); sort(s2.begin(), s2.end());

return s1 == s2;

}

int main() { string s1, s2; cin >> s1 >> s2;

if (isWildcard(s1, s2)) {
    cout << 'A' << endl;
} else {
    cout << 'N' << endl;
}

return 0;

}

C++ 字符串通配符变位词判断