Problem description

Anton likes to play chess, and so does his friend Danik.

Once they have played n games in a row. For each game it's known who was the winner — Anton or Danik. None of the games ended with a tie.

Now Anton wonders, who won more games, he or Danik? Help him determine this.

Input

The first line of the input contains a single integer n (1 ≤ n ≤ 100 000) — the number of games played.

The second line contains a string s, consisting of n uppercase English letters 'A' and 'D' — the outcome of each of the games. The i-th character of the string is equal to 'A' if the Anton won the i-th game and 'D' if Danik won the i-th game.

Output

If Anton won more games than Danik, print "Anton" (without quotes) in the only line of the output.

If Danik won more games than Anton, print "Danik" (without quotes) in the only line of the output.

If Anton and Danik won the same number of games, print "Friendship" (without quotes).

Examples

Input

6
ADAAAA

Output

Anton

Input

7
DDDAADA

Output

Danik

Input

6
DADADA

Output

Friendship

Note

In the first sample, Anton won 6 games, while Danik — only 1. Hence, the answer is "Anton".

In the second sample, Anton won 3 games and Danik won 4 games, so the answer is "Danik".

In the third sample, both Anton and Danik won 3 games and the answer is "Friendship".

解题思路:简单比较'A'和'D'出现的次数即可,水过!

AC代码:

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

最新文章

  1. 模拟ajax的同异步
  2. ubuntu12.04安装搜狗输入法和配置
  3. book
  4. WinFrom 登录窗体 密码保存效果
  5. List分页 参考
  6. java socket解析和发送二进制报文工具(附java和C++转化问题)
  7. 生鲜配送管理系统_升鲜宝V2.0 供应商协同系统设计思想及设计效果展现(一)
  8. C语言判断水仙花数
  9. JavaScript实现全屏显示
  10. spring(三、spring中的eheche缓存、redis使用)
  11. Vue.js入门系列(一)
  12. MFC函数—— CFrameWnd::OnCreateClient
  13. Tree Cutting (Hard Version) CodeForces - 1118F2 (树形DP,计数)
  14. opencv-python教程学习系列7-opencv图像基本操作
  15. homework 补第三题
  16. jzoj5928
  17. 在Linux中安装Oracle(较详细图解)
  18. mysql5.7 初始化启动
  19. Spark应用程序运行的日志存在哪里(转)
  20. 湘潭邀请赛 2018 E From Tree to Graph

热门文章

  1. Ajax系列面试题总结
  2. iview Table表格单选框互斥
  3. tomcat8安装及配置
  4. js 弹出div窗口 可移动 可关闭
  5. JeePlus 工作流版本 sping mvc oa crm erp java html5 源码
  6. C#学习笔记_12_枚举&amp;结构体
  7. Django REST framework - 认证
  8. 解决git pull每次提示输入账号密码的问题
  9. Beetl学习总结(2)——基本用法
  10. 清北学堂模拟赛d3t1 a