{"problem":{"name":"B. 3-palindrome","description":{"content":"In the beginning of the new year Keivan decided to reverse his name. He doesn't like palindromes, so he changed Naviek to Navick. He is too selfish, so for a given _n_ he wants to obtain a string of ","description_type":"Markdown"},"platform":"Codeforces","limit":{"time_limit":1000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"CF805B"},"statements":[{"statement_type":"Markdown","content":"In the beginning of the new year Keivan decided to reverse his name. He doesn't like palindromes, so he changed Naviek to Navick.\n\nHe is too selfish, so for a given _n_ he wants to obtain a string of _n_ characters, each of which is either '_a_', '_b_' or '_c_', with no _palindromes_ of length 3 appearing in the string as a substring. For example, the strings \"_abc_\" and \"_abca_\" suit him, while the string \"_aba_\" doesn't. He also want the number of letters '_c_' in his string to be as little as possible.\n\n## Input\n\nThe first line contains single integer _n_ (1 ≤ _n_ ≤ 2·105) — the length of the string.\n\n## Output\n\nPrint the string that satisfies all the constraints.\n\nIf there are multiple answers, print any of them.\n\n[samples]\n\n## Note\n\nA _palindrome_ is a sequence of characters which reads the same backward and forward.","is_translate":false,"language":"English"},{"statement_type":"Markdown","content":"在新年开始时，Keivan 决定将他的名字反转。他不喜欢回文，因此他将 Naviek 改为 Navick。\n\n他太自私了，所以对于给定的 #cf_span[n]，他希望得到一个长度为 #cf_span[n] 的字符串，每个字符都是 '_a_'、'_b_' 或 '_c_'，且字符串中不包含任何长度为 #cf_span[3] 的回文子串。例如，字符串 \"_abc_\" 和 \"_abca_\" 符合他的要求，而字符串 \"_aba_\" 不符合。他还希望字符串中字母 '_c_' 的数量尽可能少。\n\n第一行包含一个整数 #cf_span[n]（#cf_span[1 ≤ n ≤ 2·105]）— 字符串的长度。\n\n请输出满足所有约束条件的字符串。\n\n如果有多个答案，输出任意一个即可。\n\n回文是指正读和反读都相同的字符序列。\n\n## Input\n\n第一行包含一个整数 #cf_span[n]（#cf_span[1 ≤ n ≤ 2·105]）— 字符串的长度。\n\n## Output\n\n请输出满足所有约束条件的字符串。如果有多个答案，输出任意一个即可。\n\n[samples]\n\n## Note\n\n回文是指正读和反读都相同的字符序列。","is_translate":true,"language":"Chinese"},{"statement_type":"Markdown","content":"**Definitions**  \nLet $ n \\in \\mathbb{Z} $, $ 1 \\leq n \\leq 2 \\cdot 10^5 $, be the length of the string.  \nLet $ S \\in \\{a, b, c\\}^n $ be a string of length $ n $ over the alphabet $ \\{a, b, c\\} $.\n\n**Constraints**  \n1. $ S $ contains no substring of length 3 that is a palindrome.  \n2. The number of occurrences of the character $ c $ in $ S $ is minimized.\n\n**Objective**  \nFind any string $ S $ satisfying the above constraints.","is_translate":false,"language":"Formal"}],"meta":{"iden":"CF805B","tags":["constructive algorithms"],"sample_group":[["2","aa"],["3","bba"]],"created_at":"2026-03-03 11:00:39"}}