{"raw_statement":[{"iden":"problem statement","content":"We have an empty box.  \nTakahashi can cast the following two spells any number of times in any order.\n\n*   Spell $A$: puts one new ball into the box.\n*   Spell $B$: doubles the number of balls in the box.\n\nTell us a way to have exactly $N$ balls in the box with **at most $\\mathbf{120}$ casts** of spells.  \nIt can be proved that there always exists such a way under the Constraints given.\nThere is no way other than spells to alter the number of balls in the box."},{"iden":"constraints","content":"*   $1 \\leq N \\leq 10^{18}$\n*   All values in input are integers."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$N$"},{"iden":"sample input 1","content":"5"},{"iden":"sample output 1","content":"AABA\n\nThis changes the number of balls as follows: $0 \\xrightarrow{A} 1\\xrightarrow{A} 2 \\xrightarrow{B}4\\xrightarrow{A} 5$.  \nThere are also other acceptable outputs, such as `AAAAA`."},{"iden":"sample input 2","content":"14"},{"iden":"sample output 2","content":"BBABBAAAB\n\nThis changes the number of balls as follows: $0 \\xrightarrow{B} 0 \\xrightarrow{B} 0 \\xrightarrow{A}1 \\xrightarrow{B} 2 \\xrightarrow{B} 4 \\xrightarrow{A}5 \\xrightarrow{A}6 \\xrightarrow{A} 7 \\xrightarrow{B}14$.  \nIt is not required to minimize the length of $S$."}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}