{"problem":{"name":"A. Anton and Danik","description":{"content":"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. N","description_type":"Markdown"},"platform":"Codeforces","limit":{"time_limit":1000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"CF734A"},"statements":[{"statement_type":"Markdown","content":"Anton likes to play chess, and so does his friend Danik.\n\nOnce 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.\n\nNow Anton wonders, who won more games, he or Danik? Help him determine this.\n\n## Input\n\nThe first line of the input contains a single integer _n_ (1 ≤ _n_ ≤ 100 000) — the number of games played.\n\nThe 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.\n\n## Output\n\nIf Anton won more games than Danik, print \"_Anton_\" (without quotes) in the only line of the output.\n\nIf Danik won more games than Anton, print \"_Danik_\" (without quotes) in the only line of the output.\n\nIf Anton and Danik won the same number of games, print \"_Friendship_\" (without quotes).\n\n[samples]\n\n## Note\n\nIn the first sample, Anton won 6 games, while Danik — only 1. Hence, the answer is \"_Anton_\".\n\nIn the second sample, Anton won 3 games and Danik won 4 games, so the answer is \"_Danik_\".\n\nIn the third sample, both Anton and Danik won 3 games and the answer is \"_Friendship_\".","is_translate":false,"language":"English"},{"statement_type":"Markdown","content":"Anton 喜欢下棋，他的朋友 Danik 也喜欢。\n\n他们连续进行了 #cf_span[n] 场游戏。每场比赛都有胜负（非平局），已知每场的胜者是 Anton 还是 Danik。\n\n现在 Anton 想知道，他和 Danik 谁赢的场次更多？请帮助他确定。\n\n输入的第一行包含一个整数 #cf_span[n] (#cf_span[1 ≤ n ≤ 100 000]) —— 表示进行的游戏场数。\n\n第二行包含一个长度为 #cf_span[n] 的字符串 #cf_span[s]，由大写英文字母 '_A_' 和 '_D_' 组成，表示每场比赛的结果。字符串的第 #cf_span[i] 个字符为 '_A_' 表示 Anton 赢了第 #cf_span[i] 场比赛，为 '_D_' 表示 Danik 赢了第 #cf_span[i] 场比赛。\n\n如果 Anton 赢的场次多于 Danik，请在输出的唯一一行中打印 \"_Anton_\"（不含引号）。\n\n如果 Danik 赢的场次多于 Anton，请在输出的唯一一行中打印 \"_Danik_\"（不含引号）。\n\n如果 Anton 和 Danik 赢的场次相同，请打印 \"_Friendship_\"（不含引号）。\n\n在第一个样例中，Anton 赢了 #cf_span[6] 场，而 Danik 只赢了 #cf_span[1] 场，因此答案是 \"_Anton_\"。\n\n在第二个样例中，Anton 赢了 #cf_span[3] 场，Danik 赢了 #cf_span[4] 场，因此答案是 \"_Danik_\"。\n\n在第三个样例中，Anton 和 Danik 都赢了 #cf_span[3] 场，因此答案是 \"_Friendship_\"。\n\n## Input\n\n输入的第一行包含一个整数 #cf_span[n] (#cf_span[1 ≤ n ≤ 100 000]) —— 表示进行的游戏场数。第二行包含一个长度为 #cf_span[n] 的字符串 #cf_span[s]，由大写英文字母 '_A_' 和 '_D_' 组成，表示每场比赛的结果。字符串的第 #cf_span[i] 个字符为 '_A_' 表示 Anton 赢了第 #cf_span[i] 场比赛，为 '_D_' 表示 Danik 赢了第 #cf_span[i] 场比赛。\n\n## Output\n\n如果 Anton 赢的场次多于 Danik，请在输出的唯一一行中打印 \"_Anton_\"（不含引号）。如果 Danik 赢的场次多于 Anton，请在输出的唯一一行中打印 \"_Danik_\"（不含引号）。如果 Anton 和 Danik 赢的场次相同，请打印 \"_Friendship_\"（不含引号）。\n\n[samples]\n\n## Note\n\n在第一个样例中，Anton 赢了 #cf_span[6] 场，而 Danik 只赢了 #cf_span[1] 场，因此答案是 \"_Anton_\"。在第二个样例中，Anton 赢了 #cf_span[3] 场，Danik 赢了 #cf_span[4] 场，因此答案是 \"_Danik_\"。在第三个样例中，Anton 和 Danik 都赢了 #cf_span[3] 场，因此答案是 \"_Friendship_\"。","is_translate":true,"language":"Chinese"},{"statement_type":"Markdown","content":"**Definitions**  \nLet $ n \\in \\mathbb{Z} $ be the number of games, with $ 1 \\leq n \\leq 100{,}000 $.  \nLet $ s \\in \\{A, D\\}^n $ be a string representing the outcomes of the games, where $ s_i = A $ if Anton won the $ i $-th game, and $ s_i = D $ if Danik won the $ i $-th game.\n\n**Constraints**  \n$ 1 \\leq n \\leq 100{,}000 $, and $ s_i \\in \\{A, D\\} $ for all $ i \\in \\{1, \\dots, n\\} $.\n\n**Objective**  \nLet $ a = |\\{i \\mid s_i = A\\}| $ and $ d = |\\{i \\mid s_i = D\\}| $.  \nOutput:  \n- $ \\text{Anton} $ if $ a > d $,  \n- $ \\text{Danik} $ if $ d > a $,  \n- $ \\text{Friendship} $ if $ a = d $.","is_translate":false,"language":"Formal"}],"meta":{"iden":"CF734A","tags":["implementation","strings"],"sample_group":[["6\nADAAAA","Anton"],["7\nDDDAADA","Danik"],["6\nDADADA","Friendship"]],"created_at":"2026-03-03 11:00:39"}}