Codeforces-SolutionsA/734A Anton and Danik/734A.cpp
2023-06-13 23:18:17 +06:00

18 lines
306 B
C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
int n,a=0,d=0;
cin>>n;
string s;
cin>>s;
for(int i=0;i<n;i++)
{
if(s[i]=='A') a++;
else d++;
}
if(a==d) cout<<"Friendship"<<endl;
else if(a>d) cout<<"Anton"<<endl;
else cout<<"Danik"<<endl;
}