{"raw_statement":[{"iden":"statement","content":"Each evening Roma plays online poker on his favourite website. The rules of poker on this website are a bit strange: there are always two players in a hand, there are no bets, and the winner takes 1 virtual bourle from the loser.\n\nLast evening Roma started to play poker. He decided to spend no more than _k_ virtual bourles — he will stop immediately if the number of his loses exceeds the number of his wins by _k_. Also Roma will leave the game if he wins enough money for the evening, i.e. if the number of wins exceeds the number of loses by _k_.\n\nNext morning Roma found a piece of paper with a sequence on it representing his results. Roma doesn't remember the results exactly, and some characters in the sequence are written in a way such that it's impossible to recognize this character, so Roma can't recall whether he won _k_ bourles or he lost.\n\nThe sequence written by Roma is a string _s_ consisting of characters _W_ (Roma won the corresponding hand), _L_ (Roma lost), _D_ (draw) and _?_ (unknown result). Roma wants to restore any _valid_ sequence by changing all _?_ characters to _W_, _L_ or _D_. The sequence is called _valid_ if all these conditions are met:\n\n*   In the end the absolute difference between the number of wins and loses is equal to _k_;\n*   There is no hand such that the absolute difference before this hand was equal to _k_.\n\nHelp Roma to restore any such sequence."},{"iden":"input","content":"The first line contains two numbers _n_ (the length of Roma's sequence) and _k_ (1 ≤ _n_, _k_ ≤ 1000).\n\nThe second line contains the sequence _s_ consisting of characters _W_, _L_, _D_ and _?_. There are exactly _n_ characters in this sequence."},{"iden":"output","content":"If there is no _valid_ sequence that can be obtained from _s_ by replacing all _?_ characters by _W_, _L_ or _D_, print _NO_.\n\nOtherwise print this sequence. If there are multiple answers, print any of them."},{"iden":"examples","content":"Input\n\n3 2\nL??\n\nOutput\n\nLDL\n\nInput\n\n3 1\nW??\n\nOutput\n\nNO\n\nInput\n\n20 5\n?LLLLLWWWWW?????????\n\nOutput\n\nWLLLLLWWWWWWWWLWLWDW"}],"translated_statement":[{"iden":"statement","content":"每天晚上，Roma 都在他最喜欢的网站上玩在线扑克。这个网站的扑克规则有些特别：每局总是两名玩家，没有下注，赢家从输家那里赢得 1 虚拟布尔。\n\n昨晚，Roma 开始玩扑克。他决定最多只花 #cf_span[k] 虚拟布尔——如果他的输局数超过赢局数达到 #cf_span[k]，他会立即停止。此外，如果他的赢局数超过输局数达到 #cf_span[k]，他也会离开游戏，因为他已经赢够了今晚的钱。\n\n第二天早上，Roma 找到一张写有序列的纸，记录了他的比赛结果。Roma 不记得确切的结果，序列中有些字符书写模糊，无法辨认，因此他无法确定自己是赢了还是输了。\n\nRoma 写下的序列是一个字符串 #cf_span[s]，由字符 _W_（Roma 赢了该局）、_L_（Roma 输了）、_D_（平局）和 _?_（未知结果）组成。Roma 希望通过将所有 _?_ 字符替换为 _W_、_L_ 或 _D_ 来恢复任意一个 _有效_ 序列。一个序列被称为 _有效_，当且仅当满足以下所有条件：\n\n帮助 Roma 恢复任意一个这样的序列。\n\n第一行包含两个数字 #cf_span[n]（Roma 序列的长度）和 #cf_span[k]（#cf_span[1 ≤ n, k ≤ 1000]）。\n\n第二行包含一个由字符 _W_、_L_、_D_ 和 _?_ 组成的序列 #cf_span[s]。该序列恰好包含 #cf_span[n] 个字符。\n\n如果无法通过将所有 _?_ 字符替换为 _W_、_L_ 或 _D_ 得到任何 _有效_ 序列，请输出 _NO_。\n\n否则，请输出这样一个序列。如果有多个答案，输出任意一个即可。\n\n"},{"iden":"input","content":"第一行包含两个数字 #cf_span[n]（Roma 序列的长度）和 #cf_span[k]（#cf_span[1 ≤ n, k ≤ 1000]）。第二行包含一个由字符 _W_、_L_、_D_ 和 _?_ 组成的序列 #cf_span[s]。该序列恰好包含 #cf_span[n] 个字符。"},{"iden":"output","content":"如果无法通过将所有 _?_ 字符替换为 _W_、_L_ 或 _D_ 得到任何 _有效_ 序列，请输出 _NO_。否则，请输出这样一个序列。如果有多个答案，输出任意一个即可。"},{"iden":"examples","content":"输入3 2L??输出LDL输入3 1W??输出NO输入20 5?LLLLLWWWWW?????????输出WLLLLLWWWWWWWWLWLWDW"}],"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ n, k \\in \\mathbb{Z}^+ $ with $ 1 \\leq n, k \\leq 1000 $.  \nLet $ s \\in \\{W, L, D, ?\\}^n $ be the input sequence of length $ n $.  \n\n**Constraints**  \nLet $ s' \\in \\{W, L, D\\}^n $ be a sequence obtained by replacing each $ ? $ in $ s $ with $ W $, $ L $, or $ D $.  \nDefine the cumulative difference at position $ i $ as:  \n$$\nd_i = (\\text{number of } W \\text{ in } s'[1:i]) - (\\text{number of } L \\text{ in } s'[1:i])\n$$  \nThe sequence $ s' $ is *valid* if:  \n1. For all $ i \\in \\{1, \\dots, n\\} $, $ |d_i| < k $.  \n2. If $ |d_i| = k $ for some $ i \\leq n $, then $ d_i = k $ or $ d_i = -k $, and this occurs **only** at the final position $ i = n $ (i.e., the game stops exactly when $ |d_n| = k $, and not earlier).  \n\n**Objective**  \nFind any valid $ s' $, or output \"NO\" if none exists.","simple_statement":null,"has_page_source":false}