{"raw_statement":[{"iden":"statement","content":"Recall that a #cf_span(class=[tex-font-style-underline], body=[subsequence]) of a string is any string obtained by removing some subset of characters from the string, for instance \"string\", \"sing\", \"i\" and \"sg\" are all subsequences of \"string\". If the same subsequence can be obtained in exactly $t$ different ways, by removing different subsets of characters, we say that the subsequence occurs $t$ times.\n\nJingfei wants to create a nonempty bit string that has the following properties: \n\nThe input consists of a single line with four integers $a$, $b$, $c$, and $d$ ($0 <= a, b, c, d <= 10^9$).\n\nOutput a bit string that satisfies the given requirements. If there are several solutions, output any one of them. If there are no solutions, output \"_impossible_\".\n\n"},{"iden":"input","content":"The input consists of a single line with four integers $a$, $b$, $c$, and $d$ ($0 <= a, b, c, d <= 10^9$)."},{"iden":"output","content":"Output a bit string that satisfies the given requirements. If there are several solutions, output any one of them. If there are no solutions, output \"_impossible_\"."},{"iden":"examples","content":"Input3 4 2 1Output01001Input5 0 0 5Outputimpossible"}],"translated_statement":null,"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ s \\in \\{0,1\\}^+ $ be a nonempty bit string.  \nFor any substring $ w \\in \\{0,1\\}^* $, let $ f_s(w) $ denote the number of distinct ways to obtain $ w $ as a subsequence of $ s $.\n\n**Constraints**  \nGiven integers $ a, b, c, d \\in \\mathbb{Z}_{\\geq 0} $ with $ 0 \\leq a, b, c, d \\leq 10^9 $, require:  \n- $ f_s(\"0\") = a $,  \n- $ f_s(\"1\") = b $,  \n- $ f_s(\"01\") = c $,  \n- $ f_s(\"00\") = d $.  \n\n**Objective**  \nFind a nonempty bit string $ s $ satisfying the above, or output \"impossible\" if no such string exists.","simple_statement":"Given four integers a, b, c, d, find any nonempty bit string where:\n\n- \"0\" appears as a subsequence exactly a times,  \n- \"1\" appears as a subsequence exactly b times,  \n- \"01\" appears as a subsequence exactly c times,  \n- \"10\" appears as a subsequence exactly d times.  \n\nIf no such string exists, output \"impossible\".","has_page_source":false}