Karlsson has recently discovered a huge stock of berry jam jars in the basement of the house. More specifically, there were $$$2n$$$ jars of strawberry and blueberry jam.All the $$$2n$$$ jars are arranged in a row. The stairs to the basement are exactly in the middle of that row. So when Karlsson enters the basement, he sees exactly $$$n$$$ jars to his left and $$$n$$$ jars to his right.For example, the basement might look like this:  Being the starightforward man he is, he immediately starts eating the jam. In one minute he chooses to empty either the first non-empty jar to his left or the first non-empty jar to his right.Finally, Karlsson decided that at the end the amount of full strawberry and blueberry jam jars should become the same.For example, this might be the result:  He has eaten $$$1$$$ jar to his left and then $$$5$$$ jars to his right. There remained exactly $$$3$$$ full jars of both strawberry and blueberry jam. Jars are numbered from $$$1$$$ to $$$2n$$$ from left to right, so Karlsson initially stands between jars $$$n$$$ and $$$n+1$$$.What is the minimum number of jars Karlsson is required to empty so that an equal number of full strawberry and blueberry jam jars is left?Your program should answer $$$t$$$ independent test cases.

The first line contains one integer $$$t$$$ ($$$1 \le t \le 1000$$$) — the number of test cases. The first line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 10^5$$$). The second line of each test case contains $$$2n$$$ integers $$$a_1, a_2, \dots, a_{2n}$$$ ($$$1 \le a_i \le 2$$$) — $$$a_i=1$$$ means that the $$$i$$$-th jar from the left is a strawberry jam jar and $$$a_i=2$$$ means that it is a blueberry jam jar. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^5$$$.

For each test case print the answer to it — the minimum number of jars Karlsson is required to empty so that an equal number of full strawberry and blueberry jam jars is left.

NoteThe picture from the statement describes the first test case.In the second test case the number of strawberry and blueberry jam jars is already equal.In the third test case Karlsson is required to eat all $$$6$$$ jars so that there remain $$$0$$$ jars of both jams.In the fourth test case Karlsson can empty either the second and the third jars or the third and the fourth one. The both scenarios will leave $$$1$$$ jar of both jams.


As the name of the task implies, you are asked to do some work with segments and trees.Recall that a tree is a connected undirected graph such that there is exactly one simple path between every pair of its vertices.You are given $$$n$$$ segments $$$[l_1, r_1], [l_2, r_2], \dots, [l_n, r_n]$$$, $$$l_i < r_i$$$ for every $$$i$$$. It is guaranteed that all segments' endpoints are integers, and all endpoints are unique — there is no pair of segments such that they start in the same point, end in the same point or one starts in the same point the other one ends.Let's generate a graph with $$$n$$$ vertices from these segments. Vertices $$$v$$$ and $$$u$$$ are connected by an edge if and only if segments $$$[l_v, r_v]$$$ and $$$[l_u, r_u]$$$ intersect and neither of it lies fully inside the other one.For example, pairs $$$([1, 3], [2, 4])$$$ and $$$([5, 10], [3, 7])$$$ will induce the edges but pairs $$$([1, 2], [3, 4])$$$ and $$$([5, 7], [3, 10])$$$ will not.Determine if the resulting graph is a tree or not.

The first line contains a single integer $$$n$$$ ($$$1 \le n \le 5 \cdot 10^5$$$) — the number of segments. The $$$i$$$-th of the next $$$n$$$ lines contain the description of the $$$i$$$-th segment — two integers $$$l_i$$$ and $$$r_i$$$ ($$$1 \le l_i < r_i \le 2n$$$). It is guaranteed that all segments borders are pairwise distinct.

Print "YES" if the resulting graph is a tree and "NO" otherwise.

NoteThe graph corresponding to the first example:The graph corresponding to the second example:The graph corresponding to the third example:


We had a really tough time generating tests for problem D. In order to prepare strong tests, we had to solve the following problem.Given an undirected labeled tree consisting of $$$n$$$ vertices, find a set of segments such that:  both endpoints of each segment are integers from $$$1$$$ to $$$2n$$$, and each integer from $$$1$$$ to $$$2n$$$ should appear as an endpoint of exactly one segment;  all segments are non-degenerate;  for each pair $$$(i, j)$$$ such that $$$i \ne j$$$, $$$i \in [1, n]$$$ and $$$j \in [1, n]$$$, the vertices $$$i$$$ and $$$j$$$ are connected with an edge if and only if the segments $$$i$$$ and $$$j$$$ intersect, but neither segment $$$i$$$ is fully contained in segment $$$j$$$, nor segment $$$j$$$ is fully contained in segment $$$i$$$. Can you solve this problem too?

The first line contains one integer $$$n$$$ ($$$1 \le n \le 5 \cdot 10^5$$$) — the number of vertices in the tree. Then $$$n - 1$$$ lines follow, each containing two integers $$$x_i$$$ and $$$y_i$$$ ($$$1 \le x_i, y_i \le n$$$, $$$x_i \ne y_i$$$) denoting the endpoints of the $$$i$$$-th edge. It is guaranteed that the given graph is a tree.

Print $$$n$$$ pairs of integers, the $$$i$$$-th pair should contain two integers $$$l_i$$$ and $$$r_i$$$ ($$$1 \le l_i < r_i \le 2n$$$) — the endpoints of the $$$i$$$-th segment. All $$$2n$$$ integers you print should be unique. It is guaranteed that the answer always exists.


You are given two integers $$$a$$$ and $$$b$$$. You can perform a sequence of operations: during the first operation you choose one of these numbers and increase it by $$$1$$$; during the second operation you choose one of these numbers and increase it by $$$2$$$, and so on. You choose the number of these operations yourself.For example, if $$$a = 1$$$ and $$$b = 3$$$, you can perform the following sequence of three operations:   add $$$1$$$ to $$$a$$$, then $$$a = 2$$$ and $$$b = 3$$$;  add $$$2$$$ to $$$b$$$, then $$$a = 2$$$ and $$$b = 5$$$;  add $$$3$$$ to $$$a$$$, then $$$a = 5$$$ and $$$b = 5$$$. Calculate the minimum number of operations required to make $$$a$$$ and $$$b$$$ equal.

The first line contains one integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The only line of each test case contains two integers $$$a$$$ and $$$b$$$ ($$$1 \le a, b \le 10^9$$$).

For each test case print one integer — the minimum numbers of operations required to make $$$a$$$ and $$$b$$$ equal.

NoteFirst test case considered in the statement.In the second test case integers $$$a$$$ and $$$b$$$ are already equal, so you don't need to perform any operations.In the third test case you have to apply the first, the second, the third and the fourth operation to $$$b$$$ ($$$b$$$ turns into $$$20 + 1 + 2 + 3 + 4 = 30$$$).


Consider the following experiment. You have a deck of $$$m$$$ cards, and exactly one card is a joker. $$$n$$$ times, you do the following: shuffle the deck, take the top card of the deck, look at it and return it into the deck.Let $$$x$$$ be the number of times you have taken the joker out of the deck during this experiment. Assuming that every time you shuffle the deck, all $$$m!$$$ possible permutations of cards are equiprobable, what is the expected value of $$$x^k$$$? Print the answer modulo $$$998244353$$$.

Print one integer — the expected value of $$$x^k$$$, taken modulo $$$998244353$$$ (the answer can always be represented as an irreducible fraction $$$\frac{a}{b}$$$, where $$$b \mod 998244353 \ne 0$$$; you have to print $$$a \cdot b^{-1} \mod 998244353$$$).


New Year is coming! Vasya has prepared a New Year's verse and wants to recite it in front of Santa Claus.Vasya's verse contains $$$n$$$ parts. It takes $$$a_i$$$ seconds to recite the $$$i$$$-th part. Vasya can't change the order of parts in the verse: firstly he recites the part which takes $$$a_1$$$ seconds, secondly — the part which takes $$$a_2$$$ seconds, and so on. After reciting the verse, Vasya will get the number of presents equal to the number of parts he fully recited.Vasya can skip at most one part of the verse while reciting it (if he skips more than one part, then Santa will definitely notice it).Santa will listen to Vasya's verse for no more than $$$s$$$ seconds. For example, if $$$s = 10$$$, $$$a = [100, 9, 1, 1]$$$, and Vasya skips the first part of verse, then he gets two presents.Note that it is possible to recite the whole verse (if there is enough time). Determine which part Vasya needs to skip to obtain the maximum possible number of gifts. If Vasya shouldn't skip anything, print 0. If there are multiple answers, print any of them.You have to process $$$t$$$ test cases.

The first line contains one integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The first line of each test case contains two integers $$$n$$$ and $$$s$$$ ($$$1 \le n \le 10^5, 1 \le s \le 10^9$$$) — the number of parts in the verse and the maximum number of seconds Santa will listen to Vasya, respectively. The second line of each test case contains $$$n$$$ integers $$$a_1, a_2, \dots, a_n$$$ ($$$1 \le a_i \le 10^9$$$) — the time it takes to recite each part of the verse. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^5$$$.

For each test case print one integer — the number of the part that Vasya needs to skip to obtain the maximum number of gifts. If Vasya shouldn't skip any parts, print 0.

NoteIn the first test case if Vasya skips the second part then he gets three gifts.In the second test case no matter what part of the verse Vasya skips.In the third test case Vasya can recite the whole verse.


Polycarp is sad — New Year is coming in few days but there is still no snow in his city. To bring himself New Year mood, he decided to decorate his house with some garlands.The local store introduced a new service this year, called "Build your own garland". So you can buy some red, green and blue lamps, provide them and the store workers will solder a single garland of them. The resulting garland will have all the lamps you provided put in a line. Moreover, no pair of lamps of the same color will be adjacent to each other in this garland!For example, if you provide $$$3$$$ red, $$$3$$$ green and $$$3$$$ blue lamps, the resulting garland can look like this: "RGBRBGBGR" ("RGB" being the red, green and blue color, respectively). Note that it's ok to have lamps of the same color on the ends of the garland.However, if you provide, say, $$$1$$$ red, $$$10$$$ green and $$$2$$$ blue lamps then the store workers won't be able to build any garland of them. Any garland consisting of these lamps will have at least one pair of lamps of the same color adjacent to each other. Note that the store workers should use all the lamps you provided.So Polycarp has bought some sets of lamps and now he wants to know if the store workers can build a garland from each of them.

The first line contains a single integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of sets of lamps Polycarp has bought. Each of the next $$$t$$$ lines contains three integers $$$r$$$, $$$g$$$ and $$$b$$$ ($$$1 \le r, g, b \le 10^9$$$) — the number of red, green and blue lamps in the set, respectively.

Print $$$t$$$ lines — for each set of lamps print "Yes" if the store workers can build a garland from them and "No" otherwise.

NoteThe first two sets are desribed in the statement.The third set produces garland "RBRG", for example.


Santa has to send presents to the kids. He has a large stack of $$$n$$$ presents, numbered from $$$1$$$ to $$$n$$$; the topmost present has number $$$a_1$$$, the next present is $$$a_2$$$, and so on; the bottom present has number $$$a_n$$$. All numbers are distinct.Santa has a list of $$$m$$$ distinct presents he has to send: $$$b_1$$$, $$$b_2$$$, ..., $$$b_m$$$. He will send them in the order they appear in the list.To send a present, Santa has to find it in the stack by removing all presents above it, taking this present and returning all removed presents on top of the stack. So, if there are $$$k$$$ presents above the present Santa wants to send, it takes him $$$2k + 1$$$ seconds to do it. Fortunately, Santa can speed the whole process up — when he returns the presents to the stack, he may reorder them as he wishes (only those which were above the present he wanted to take; the presents below cannot be affected in any way).What is the minimum time required to send all of the presents, provided that Santa knows the whole list of presents he has to send and reorders the presents optimally? Santa cannot change the order of presents or interact with the stack of presents in any other way.Your program has to answer $$$t$$$ different test cases.

The first line contains one integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. Then the test cases follow, each represented by three lines. The first line contains two integers $$$n$$$ and $$$m$$$ ($$$1 \le m \le n \le 10^5$$$) — the number of presents in the stack and the number of presents Santa wants to send, respectively. The second line contains $$$n$$$ integers $$$a_1$$$, $$$a_2$$$, ..., $$$a_n$$$ ($$$1 \le a_i \le n$$$, all $$$a_i$$$ are unique) — the order of presents in the stack. The third line contains $$$m$$$ integers $$$b_1$$$, $$$b_2$$$, ..., $$$b_m$$$ ($$$1 \le b_i \le n$$$, all $$$b_i$$$ are unique) — the ordered list of presents Santa has to send. The sum of $$$n$$$ over all test cases does not exceed $$$10^5$$$.

For each test case print one integer — the minimum number of seconds which Santa has to spend sending presents, if he reorders the presents optimally each time he returns them into the stack.


Santa Claus has received letters from $$$n$$$ different kids throughout this year. Of course, each kid wants to get some presents from Santa: in particular, the $$$i$$$-th kid asked Santa to give them one of $$$k_i$$$ different items as a present. Some items could have been asked by multiple kids.Santa is really busy, so he wants the New Year Bot to choose the presents for all children. Unfortunately, the Bot's algorithm of choosing presents is bugged. To choose a present for some kid, the Bot does the following:  choose one kid $$$x$$$ equiprobably among all $$$n$$$ kids;  choose some item $$$y$$$ equiprobably among all $$$k_x$$$ items kid $$$x$$$ wants;  choose a kid $$$z$$$ who will receive the present equipropably among all $$$n$$$ kids (this choice is independent of choosing $$$x$$$ and $$$y$$$); the resulting triple $$$(x, y, z)$$$ is called the decision of the Bot. If kid $$$z$$$ listed item $$$y$$$ as an item they want to receive, then the decision valid. Otherwise, the Bot's choice is invalid.Santa is aware of the bug, but he can't estimate if this bug is really severe. To do so, he wants to know the probability that one decision generated according to the aforementioned algorithm is valid. Can you help him?

The first line contains one integer $$$n$$$ ($$$1 \le n \le 10^6$$$) — the number of kids who wrote their letters to Santa. Then $$$n$$$ lines follow, the $$$i$$$-th of them contains a list of items wanted by the $$$i$$$-th kid in the following format: $$$k_i$$$ $$$a_{i, 1}$$$ $$$a_{i, 2}$$$ ... $$$a_{i, k_i}$$$ ($$$1 \le k_i, a_{i, j} \le 10^6$$$), where $$$k_i$$$ is the number of items wanted by the $$$i$$$-th kid, and $$$a_{i, j}$$$ are the items themselves. No item is contained in the same list more than once. It is guaranteed that $$$\sum \limits_{i = 1}^{n} k_i \le 10^6$$$.

Print the probatility that the Bot produces a valid decision as follows: Let this probability be represented as an irreducible fraction $$$\frac{x}{y}$$$. You have to print $$$x \cdot y^{-1} \mod 998244353$$$, where $$$y^{-1}$$$ is the inverse element of $$$y$$$ modulo $$$998244353$$$ (such integer that $$$y \cdot y^{-1}$$$ has remainder $$$1$$$ modulo $$$998244353$$$).


New Year is getting near. So it's time to change handles on codeforces. Mishka wants to change his handle but in such a way that people would not forget who he is.To make it work, he only allowed to change letters case. More formally, during one handle change he can choose any segment of his handle $$$[i; i + l - 1]$$$ and apply tolower or toupper to all letters of his handle on this segment (more fomally, replace all uppercase letters with corresponding lowercase or vice versa). The length $$$l$$$ is fixed for all changes.Because it is not allowed to change codeforces handle too often, Mishka can perform at most $$$k$$$ such operations. What is the minimum value of $$$min(lower, upper)$$$ (where $$$lower$$$ is the number of lowercase letters, and $$$upper$$$ is the number of uppercase letters) can be obtained after optimal sequence of changes?

The first line of the input contains three integers $$$n, k$$$ and $$$l$$$ ($$$1 \le n, k, l \le 10^6, l \le n)$$$ — the length of Mishka's handle, the number of changes and the length of the segment. The second line of the input contains one string $$$s$$$, consisting of $$$n$$$ lowercase and uppercase Latin letters — Mishka's handle.

Print one integer — the minimum value of $$$min(lower, upper)$$$ after that Mishka change his handle at most $$$k$$$ times in a way described in the problem statement.


Yeah, we failed to make up a New Year legend for this problem.A permutation of length $$$n$$$ is an array of $$$n$$$ integers such that every integer from $$$1$$$ to $$$n$$$ appears in it exactly once. An element $$$y$$$ of permutation $$$p$$$ is reachable from element $$$x$$$ if $$$x = y$$$, or $$$p_x = y$$$, or $$$p_{p_x} = y$$$, and so on. The decomposition of a permutation $$$p$$$ is defined as follows: firstly, we have a permutation $$$p$$$, all elements of which are not marked, and an empty list $$$l$$$. Then we do the following: while there is at least one not marked element in $$$p$$$, we find the leftmost such element, list all elements that are reachable from it in the order they appear in $$$p$$$, mark all of these elements, then cyclically shift the list of those elements so that the maximum appears at the first position, and add this list as an element of $$$l$$$. After all elements are marked, $$$l$$$ is the result of this decomposition.For example, if we want to build a decomposition of $$$p = [5, 4, 2, 3, 1, 7, 8, 6]$$$, we do the following:  initially $$$p = [5, 4, 2, 3, 1, 7, 8, 6]$$$ (bold elements are marked), $$$l = []$$$;  the leftmost unmarked element is $$$5$$$; $$$5$$$ and $$$1$$$ are reachable from it, so the list we want to shift is $$$[5, 1]$$$; there is no need to shift it, since maximum is already the first element;  $$$p = [\textbf{5}, 4, 2, 3, \textbf{1}, 7, 8, 6]$$$, $$$l = [[5, 1]]$$$;  the leftmost unmarked element is $$$4$$$, the list of reachable elements is $$$[4, 2, 3]$$$; the maximum is already the first element, so there's no need to shift it;  $$$p = [\textbf{5}, \textbf{4}, \textbf{2}, \textbf{3}, \textbf{1}, 7, 8, 6]$$$, $$$l = [[5, 1], [4, 2, 3]]$$$;  the leftmost unmarked element is $$$7$$$, the list of reachable elements is $$$[7, 8, 6]$$$; we have to shift it, so it becomes $$$[8, 6, 7]$$$;  $$$p = [\textbf{5}, \textbf{4}, \textbf{2}, \textbf{3}, \textbf{1}, \textbf{7}, \textbf{8}, \textbf{6}]$$$, $$$l = [[5, 1], [4, 2, 3], [8, 6, 7]]$$$;  all elements are marked, so $$$[[5, 1], [4, 2, 3], [8, 6, 7]]$$$ is the result. The New Year transformation of a permutation is defined as follows: we build the decomposition of this permutation; then we sort all lists in decomposition in ascending order of the first elements (we don't swap the elements in these lists, only the lists themselves); then we concatenate the lists into one list which becomes a new permutation. For example, the New Year transformation of $$$p = [5, 4, 2, 3, 1, 7, 8, 6]$$$ is built as follows:  the decomposition is $$$[[5, 1], [4, 2, 3], [8, 6, 7]]$$$;  after sorting the decomposition, it becomes $$$[[4, 2, 3], [5, 1], [8, 6, 7]]$$$;  $$$[4, 2, 3, 5, 1, 8, 6, 7]$$$ is the result of the transformation. We call a permutation good if the result of its transformation is the same as the permutation itself. For example, $$$[4, 3, 1, 2, 8, 5, 6, 7]$$$ is a good permutation; and $$$[5, 4, 2, 3, 1, 7, 8, 6]$$$ is bad, since the result of transformation is $$$[4, 2, 3, 5, 1, 8, 6, 7]$$$.Your task is the following: given $$$n$$$ and $$$k$$$, find the $$$k$$$-th (lexicographically) good permutation of length $$$n$$$.

The first line contains one integer $$$t$$$ ($$$1 \le t \le 1000$$$) — the number of test cases. Then the test cases follow. Each test case is represented by one line containing two integers $$$n$$$ and $$$k$$$ ($$$1 \le n \le 50$$$, $$$1 \le k \le 10^{18}$$$).

For each test case, print the answer to it as follows: if the number of good permutations of length $$$n$$$ is less than $$$k$$$, print one integer $$$-1$$$; otherwise, print the $$$k$$$-th good permutation on $$$n$$$ elements (in lexicographical order).


We start with a string $$$s$$$ consisting only of the digits $$$1$$$, $$$2$$$, or $$$3$$$. The length of $$$s$$$ is denoted by $$$|s|$$$. For each $$$i$$$ from $$$1$$$ to $$$|s|$$$, the $$$i$$$-th character of $$$s$$$ is denoted by $$$s_i$$$. There is one cursor. The cursor's location $$$\ell$$$ is denoted by an integer in $$$\{0, \ldots, |s|\}$$$, with the following meaning:   If $$$\ell = 0$$$, then the cursor is located before the first character of $$$s$$$.  If $$$\ell = |s|$$$, then the cursor is located right after the last character of $$$s$$$.  If $$$0 < \ell < |s|$$$, then the cursor is located between $$$s_\ell$$$ and $$$s_{\ell+1}$$$. We denote by $$$s_\text{left}$$$ the string to the left of the cursor and $$$s_\text{right}$$$ the string to the right of the cursor. We also have a string $$$c$$$, which we call our clipboard, which starts out as empty. There are three types of actions:  The Move action. Move the cursor one step to the right. This increments $$$\ell$$$ once.  The Cut action. Set $$$c \leftarrow s_\text{right}$$$, then set $$$s \leftarrow s_\text{left}$$$.  The Paste action. Append the value of $$$c$$$ to the end of the string $$$s$$$. Note that this doesn't modify $$$c$$$. The cursor initially starts at $$$\ell = 0$$$. Then, we perform the following procedure:  Perform the Move action once.  Perform the Cut action once.  Perform the Paste action $$$s_\ell$$$ times.  If $$$\ell = x$$$, stop. Otherwise, return to step 1. You're given the initial string $$$s$$$ and the integer $$$x$$$. What is the length of $$$s$$$ when the procedure stops? Since this value may be very large, only find it modulo $$$10^9 + 7$$$. It is guaranteed that $$$\ell \le |s|$$$ at any time.

The first line of input contains a single integer $$$t$$$ ($$$1 \le t \le 1000$$$) denoting the number of test cases. The next lines contain descriptions of the test cases. The first line of each test case contains a single integer $$$x$$$ ($$$1 \le x \le 10^6$$$). The second line of each test case consists of the initial string $$$s$$$ ($$$1 \le |s| \le 500$$$). It is guaranteed, that $$$s$$$ consists of the characters "1", "2", "3". It is guaranteed that the sum of $$$x$$$ in a single file is at most $$$10^6$$$. It is guaranteed that in each test case before the procedure will stop it will be true that $$$\ell \le |s|$$$ at any time.

For each test case, output a single line containing a single integer denoting the answer for that test case modulo $$$10^9 + 7$$$.

NoteLet's illustrate what happens with the first test case. Initially, we have $$$s = $$$ 231. Initially, $$$\ell = 0$$$ and $$$c = \varepsilon$$$ (the empty string). The following things happen if we follow the procedure above:  Step 1, Move once: we get $$$\ell = 1$$$.  Step 2, Cut once: we get $$$s = $$$ 2 and $$$c = $$$ 31.  Step 3, Paste $$$s_\ell = $$$ 2 times: we get $$$s = $$$ 23131.  Step 4: $$$\ell = 1 \not= x = 5$$$, so we return to step 1.   Step 1, Move once: we get $$$\ell = 2$$$.  Step 2, Cut once: we get $$$s = $$$ 23 and $$$c = $$$ 131.  Step 3, Paste $$$s_\ell = $$$ 3 times: we get $$$s = $$$ 23131131131.  Step 4: $$$\ell = 2 \not= x = 5$$$, so we return to step 1.   Step 1, Move once: we get $$$\ell = 3$$$.  Step 2, Cut once: we get $$$s = $$$ 231 and $$$c = $$$ 31131131.  Step 3, Paste $$$s_\ell = $$$ 1 time: we get $$$s = $$$ 23131131131.  Step 4: $$$\ell = 3 \not= x = 5$$$, so we return to step 1.   Step 1, Move once: we get $$$\ell = 4$$$.  Step 2, Cut once: we get $$$s = $$$ 2313 and $$$c = $$$ 1131131.  Step 3, Paste $$$s_\ell = $$$ 3 times: we get $$$s = $$$ 2313113113111311311131131.  Step 4: $$$\ell = 4 \not= x = 5$$$, so we return to step 1.   Step 1, Move once: we get $$$\ell = 5$$$.  Step 2, Cut once: we get $$$s = $$$ 23131 and $$$c = $$$ 13113111311311131131.  Step 3, Paste $$$s_\ell = $$$ 1 times: we get $$$s = $$$ 2313113113111311311131131.  Step 4: $$$\ell = 5 = x$$$, so we stop. At the end of the procedure, $$$s$$$ has length $$$25$$$.


Welcome! Everything is fine.You have arrived in The Medium Place, the place between The Good Place and The Bad Place. You are assigned a task that will either make people happier or torture them for eternity.You have a list of $$$k$$$ pairs of people who have arrived in a new inhabited neighborhood. You need to assign each of the $$$2k$$$ people into one of the $$$2k$$$ houses. Each person will be the resident of exactly one house, and each house will have exactly one resident.Of course, in the neighborhood, it is possible to visit friends. There are $$$2k - 1$$$ roads, each of which connects two houses. It takes some time to traverse a road. We will specify the amount of time it takes in the input. The neighborhood is designed in such a way that from anyone's house, there is exactly one sequence of distinct roads you can take to any other house. In other words, the graph with the houses as vertices and the roads as edges is a tree.The truth is, these $$$k$$$ pairs of people are actually soulmates. We index them from $$$1$$$ to $$$k$$$. We denote by $$$f(i)$$$ the amount of time it takes for the $$$i$$$-th pair of soulmates to go to each other's houses.As we have said before, you will need to assign each of the $$$2k$$$ people into one of the $$$2k$$$ houses. You have two missions, one from the entities in The Good Place and one from the entities of The Bad Place. Here they are:  The first mission, from The Good Place, is to assign the people into the houses such that the sum of $$$f(i)$$$ over all pairs $$$i$$$ is minimized. Let's define this minimized sum as $$$G$$$. This makes sure that soulmates can easily and efficiently visit each other;  The second mission, from The Bad Place, is to assign the people into the houses such that the sum of $$$f(i)$$$ over all pairs $$$i$$$ is maximized. Let's define this maximized sum as $$$B$$$. This makes sure that soulmates will have a difficult time to visit each other. What are the values of $$$G$$$ and $$$B$$$?

The first line of input contains a single integer $$$t$$$ ($$$1 \le t \le 500$$$) denoting the number of test cases. The next lines contain descriptions of the test cases. The first line of each test case contains a single integer $$$k$$$ denoting the number of pairs of people ($$$1 \le k \le 10^5$$$). The next $$$2k - 1$$$ lines describe the roads; the $$$i$$$-th of them contains three space-separated integers $$$a_i, b_i, t_i$$$ which means that the $$$i$$$-th road connects the $$$a_i$$$-th and $$$b_i$$$-th houses with a road that takes $$$t_i$$$ units of time to traverse ($$$1 \le a_i, b_i \le 2k$$$, $$$a_i \neq b_i$$$, $$$1 \le t_i \le 10^6$$$). It is guaranteed that the given roads define a tree structure. It is guaranteed that the sum of the $$$k$$$ in a single file is at most $$$3 \cdot 10^5$$$.

For each test case, output a single line containing two space-separated integers $$$G$$$ and $$$B$$$.

NoteFor the sample test case, we have a minimum sum equal to $$$G = 15$$$. One way this can be achieved is with the following assignment:  The first pair of people get assigned to houses $$$5$$$ and $$$6$$$, giving us $$$f(1) = 5$$$;  The second pair of people get assigned to houses $$$1$$$ and $$$4$$$, giving us $$$f(2) = 6$$$;  The third pair of people get assigned to houses $$$3$$$ and $$$2$$$, giving us $$$f(3) = 4$$$. Note that the sum of the $$$f(i)$$$ is $$$5 + 6 + 4 = 15$$$. We also have a maximum sum equal to $$$B = 33$$$. One way this can be achieved is with the following assignment:  The first pair of people get assigned to houses $$$1$$$ and $$$4$$$, giving us $$$f(1) = 6$$$;  The second pair of people get assigned to houses $$$6$$$ and $$$2$$$, giving us $$$f(2) = 14$$$;  The third pair of people get assigned to houses $$$3$$$ and $$$5$$$, giving us $$$f(3) = 13$$$. Note that the sum of the $$$f(i)$$$ is $$$6 + 14 + 13 = 33$$$.


You are an all-powerful being and you have created a rectangular world. In fact, your world is so bland that it could be represented by a $$$r \times c$$$ grid. Each cell on the grid represents a country. Each country has a dominant religion. There are only two religions in your world. One of the religions is called Beingawesomeism, who do good for the sake of being good. The other religion is called Pushingittoofarism, who do murders for the sake of being bad.Oh, and you are actually not really all-powerful. You just have one power, which you can use infinitely many times! Your power involves missionary groups. When a missionary group of a certain country, say $$$a$$$, passes by another country $$$b$$$, they change the dominant religion of country $$$b$$$ to the dominant religion of country $$$a$$$.In particular, a single use of your power is this:   You choose a horizontal $$$1 \times x$$$ subgrid or a vertical $$$x \times 1$$$ subgrid. That value of $$$x$$$ is up to you;  You choose a direction $$$d$$$. If you chose a horizontal subgrid, your choices will either be NORTH or SOUTH. If you choose a vertical subgrid, your choices will either be EAST or WEST;  You choose the number $$$s$$$ of steps;  You command each country in the subgrid to send a missionary group that will travel $$$s$$$ steps towards direction $$$d$$$. In each step, they will visit (and in effect convert the dominant religion of) all $$$s$$$ countries they pass through, as detailed above.  The parameters $$$x$$$, $$$d$$$, $$$s$$$ must be chosen in such a way that any of the missionary groups won't leave the grid. The following image illustrates one possible single usage of your power. Here, A represents a country with dominant religion Beingawesomeism and P represents a country with dominant religion Pushingittoofarism. Here, we've chosen a $$$1 \times 4$$$ subgrid, the direction NORTH, and $$$s = 2$$$ steps.   You are a being which believes in free will, for the most part. However, you just really want to stop receiving murders that are attributed to your name. Hence, you decide to use your powers and try to make Beingawesomeism the dominant religion in every country.What is the minimum number of usages of your power needed to convert everyone to Beingawesomeism?With god, nothing is impossible. But maybe you're not god? If it is impossible to make Beingawesomeism the dominant religion in all countries, you must also admit your mortality and say so.

The first line of input contains a single integer $$$t$$$ ($$$1 \le t \le 2\cdot 10^4$$$) denoting the number of test cases. The first line of each test case contains two space-separated integers $$$r$$$ and $$$c$$$ denoting the dimensions of the grid ($$$1 \le r, c \le 60$$$). The next $$$r$$$ lines each contains $$$c$$$ characters describing the dominant religions in the countries. In particular, the $$$j$$$-th character in the $$$i$$$-th line describes the dominant religion in the country at the cell with row $$$i$$$ and column $$$j$$$, where:   "A" means that the dominant religion is Beingawesomeism;  "P" means that the dominant religion is Pushingittoofarism.  It is guaranteed that the grid will only contain "A" or "P" characters. It is guaranteed that the sum of the $$$r \cdot c$$$ in a single file is at most $$$3 \cdot 10^6$$$.

For each test case, output a single line containing the minimum number of usages of your power needed to convert everyone to Beingawesomeism, or the string "MORTAL" (without quotes) if it is impossible to do so.

NoteIn the first test case, it can be done in two usages, as follows:Usage 1:  Usage 2:  In the second test case, it can be done with just one usage of the power. In the third test case, it is impossible to convert everyone to Beingawesomeism, so the answer is "MORTAL".

4
7 8
AAPAAAAA
PPPPAAAA
PPPPAAAA
APAAPPPP
APAPPAPP
AAAAPPAP
AAAAPPAA
6 5
AAAAA
AAAAA
AAPAA
AAPAP
AAAPP
AAAPP
4 4
PPPP
PPPP
PPPP
PPPP
3 4
PPPP
PAAP
PPPP


Your friend Kirchhoff is shocked with the current state of electronics design."Ohmygosh! Watt is wrong with the field? All these circuits are inefficient! There's so much capacity for improvement. The electrical engineers must not conduct their classes very well. It's absolutely revolting" he said.The negativity just keeps flowing out of him, but even after complaining so many times he still hasn't lepton the chance to directly change anything."These circuits have too much total resistance. Wire they designed this way? It's just causing a massive loss of resistors! Their entire field could conserve so much money if they just maximized the potential of their designs. Why can't they just try alternative ideas?"The frequency of his protests about the electrical engineering department hertz your soul, so you have decided to take charge and help them yourself. You plan to create a program that will optimize the circuits while keeping the same circuit layout and maintaining the same effective resistance.A circuit has two endpoints, and is associated with a certain constant, $$$R$$$, called its effective resistance. The circuits we'll consider will be formed from individual resistors joined together in series or in parallel, forming more complex circuits. The following image illustrates combining circuits in series or parallel.   According to your friend Kirchhoff, the effective resistance can be calculated quite easily when joining circuits this way:  When joining $$$k$$$ circuits in series with effective resistances $$$R_1, R_2, \ldots, R_k$$$, the effective resistance $$$R$$$ of the resulting circuit is the sum $$$$$$R = R_1 + R_2 + \ldots + R_k.$$$$$$  When joining $$$k$$$ circuits in parallel with effective resistances $$$R_1, R_2, \ldots, R_k$$$, the effective resistance $$$R$$$ of the resulting circuit is found by solving for $$$R$$$ in $$$$$$\frac{1}{R} = \frac{1}{R_1} + \frac{1}{R_2} + \ldots + \frac{1}{R_k},$$$$$$ assuming all $$$R_i > 0$$$; if at least one $$$R_i = 0$$$, then the effective resistance of the whole circuit is simply $$$R = 0$$$. Circuits will be represented by strings. Individual resistors are represented by an asterisk, "*". For more complex circuits, suppose $$$s_1, s_2, \ldots, s_k$$$ represent $$$k \ge 2$$$ circuits. Then:  "($$$s_1$$$ S $$$s_2$$$ S $$$\ldots$$$ S $$$s_k$$$)" represents their series circuit;  "($$$s_1$$$ P $$$s_2$$$ P $$$\ldots$$$ P $$$s_k$$$)" represents their parallel circuit. For example, "(* P (* S *) P *)" represents the following circuit:  Given a circuit, your task is to assign the resistances of the individual resistors such that they satisfy the following requirements:  Each individual resistor has a nonnegative integer resistance value;  The effective resistance of the whole circuit is $$$r$$$;  The sum of the resistances of the individual resistors is minimized. If there are $$$n$$$ individual resistors, then you need to output the list $$$r_1, r_2, \ldots, r_n$$$ ($$$0 \le r_i$$$, and $$$r_i$$$ is an integer), where $$$r_i$$$ is the resistance assigned to the $$$i$$$-th individual resistor that appears in the input (from left to right). If it is impossible to accomplish the task, you must say so as well.If it is possible, then it is guaranteed that the minimum sum of resistances is at most $$$10^{18}$$$.

The first line of input contains a single integer $$$t$$$ ($$$1 \le t \le 32000$$$), denoting the number of test cases. The next lines contain descriptions of the test cases. Each test case consists of a single line containing the integer $$$r$$$ ($$$1 \le r \le 10^6$$$), space, and then the string representing the circuit. It is guaranteed that the string is valid and follows the description above. The number of individual resistors (symbols "*") is at least $$$1$$$ and at most $$$80000$$$. It is guaranteed that the total number of individual resistors across all test cases is at most $$$320000$$$.

For each test case, print a single line:   If it's possible to achieve an effective resistance of $$$r$$$, print "REVOLTING" (without quotes) and then $$$n$$$ integers $$$r_1, r_2, \ldots, r_n$$$ — the resistances assigned to the individual resistors. Here, $$$n$$$ denotes the number of the individual resistors in the circuit.  There may be multiple possible such assignments with a minimal sum of resistances of the individual resistors, you can output any of them;  If it's impossible, print the string: "LOSS" (without quotes).

NoteThe following illustrates the third sample case:  Here, the sum of the resistances of the individual resistors is $$$2 + 1 + 1 = 4$$$, which can be shown to be the minimum. Note that there may be other assignments that achieve this minimum.

REVOLTING 5
REVOLTING 1 0
REVOLTING 2 1 1


The Oak has $$$n$$$ nesting places, numbered with integers from $$$1$$$ to $$$n$$$. Nesting place $$$i$$$ is home to $$$b_i$$$ bees and $$$w_i$$$ wasps.Some nesting places are connected by branches. We call two nesting places adjacent if there exists a branch between them. A simple path from nesting place $$$x$$$ to $$$y$$$ is given by a sequence $$$s_0, \ldots, s_p$$$ of distinct nesting places, where $$$p$$$ is a non-negative integer, $$$s_0 = x$$$, $$$s_p = y$$$, and $$$s_{i-1}$$$ and $$$s_{i}$$$ are adjacent for each $$$i = 1, \ldots, p$$$. The branches of The Oak are set up in such a way that for any two pairs of nesting places $$$x$$$ and $$$y$$$, there exists a unique simple path from $$$x$$$ to $$$y$$$. Because of this, biologists and computer scientists agree that The Oak is in fact, a tree.A village is a nonempty set $$$V$$$ of nesting places such that for any two $$$x$$$ and $$$y$$$ in $$$V$$$, there exists a simple path from $$$x$$$ to $$$y$$$ whose intermediate nesting places all lie in $$$V$$$. A set of villages $$$\cal P$$$ is called a partition if each of the $$$n$$$ nesting places is contained in exactly one of the villages in $$$\cal P$$$. In other words, no two villages in $$$\cal P$$$ share any common nesting place, and altogether, they contain all $$$n$$$ nesting places.The Oak holds its annual Miss Punyverse beauty pageant. The two contestants this year are Ugly Wasp and Pretty Bee. The winner of the beauty pageant is determined by voting, which we will now explain. Suppose $$$\mathcal{P}$$$ is a partition of the nesting places into $$$m$$$ villages $$$V_1, \ldots, V_m$$$. There is a local election in each village. Each of the insects in this village vote for their favorite contestant. If there are strictly more votes for Ugly Wasp than Pretty Bee, then Ugly Wasp is said to win in that village. Otherwise, Pretty Bee wins. Whoever wins in the most number of villages wins.As it always goes with these pageants, bees always vote for the bee (which is Pretty Bee this year) and wasps always vote for the wasp (which is Ugly Wasp this year). Unlike their general elections, no one abstains from voting for Miss Punyverse as everyone takes it very seriously.Mayor Waspacito, and his assistant Alexwasp, wants Ugly Wasp to win. He has the power to choose how to partition The Oak into exactly $$$m$$$ villages. If he chooses the partition optimally, determine the maximum number of villages in which Ugly Wasp wins.

The first line of input contains a single integer $$$t$$$ ($$$1 \le t \le 100$$$) denoting the number of test cases. The next lines contain descriptions of the test cases.  The first line of each test case contains two space-separated integers $$$n$$$ and $$$m$$$ ($$$1 \le m \le n \le 3000$$$). The second line contains $$$n$$$ space-separated integers $$$b_1, b_2, \ldots, b_n$$$ ($$$0 \le b_i \le 10^9$$$). The third line contains $$$n$$$ space-separated integers $$$w_1, w_2, \ldots, w_n$$$ ($$$0 \le w_i \le 10^9$$$). The next $$$n - 1$$$ lines describe the pairs of adjacent nesting places. In particular, the $$$i$$$-th of them contains two space-separated integers $$$x_i$$$ and $$$y_i$$$ ($$$1 \le x_i, y_i \le n$$$, $$$x_i \neq y_i$$$) denoting the numbers of two adjacent nesting places. It is guaranteed that these pairs form a tree. It is guaranteed that the sum of $$$n$$$ in a single file is at most $$$10^5$$$.

For each test case, output a single line containing a single integer denoting the maximum number of villages in which Ugly Wasp wins, among all partitions of The Oak into $$$m$$$ villages.

NoteIn the first test case, we need to partition the $$$n = 4$$$ nesting places into $$$m = 3$$$ villages. We can make Ugly Wasp win in $$$2$$$ villages via the following partition: $$$\{\{1, 2\}, \{3\}, \{4\}\}$$$. In this partition,  Ugly Wasp wins in village $$$\{1, 2\}$$$, garnering $$$181$$$ votes as opposed to Pretty Bee's $$$170$$$;  Ugly Wasp also wins in village $$$\{3\}$$$, garnering $$$111$$$ votes as opposed to Pretty Bee's $$$70$$$;  Ugly Wasp loses in the village $$$\{4\}$$$, garnering $$$0$$$ votes as opposed to Pretty Bee's $$$50$$$. Thus, Ugly Wasp wins in $$$2$$$ villages, and it can be shown that this is the maximum possible number.In the second test case, we need to partition the $$$n = 2$$$ nesting places into $$$m = 1$$$ village. There is only one way to do this: $$$\{\{1, 2\}\}$$$. In this partition's sole village, Ugly Wasp gets $$$563$$$ votes, and Pretty Bee also gets $$$563$$$ votes. Ugly Wasp needs strictly more votes in order to win. Therefore, Ugly Wasp doesn't win in any village.


We just discovered a new data structure in our research group: a suffix three!It's very useful for natural language processing. Given three languages and three suffixes, a suffix three can determine which language a sentence is written in.It's super simple, 100% accurate, and doesn't involve advanced machine learning algorithms.Let us tell you how it works.  If a sentence ends with "po" the language is Filipino.  If a sentence ends with "desu" or "masu" the language is Japanese.  If a sentence ends with "mnida" the language is Korean. Given this, we need you to implement a suffix three that can differentiate Filipino, Japanese, and Korean.Oh, did I say three suffixes? I meant four.

The first line of input contains a single integer $$$t$$$ ($$$1 \leq t \leq 30$$$) denoting the number of test cases. The next lines contain descriptions of the test cases.  Each test case consists of a single line containing a single string denoting the sentence. Spaces are represented as underscores (the symbol "_") for ease of reading. The sentence has at least $$$1$$$ and at most $$$1000$$$ characters, and consists only of lowercase English letters and underscores. The sentence has no leading or trailing underscores and no two consecutive underscores. It is guaranteed that the sentence ends with one of the four suffixes mentioned above.

For each test case, print a single line containing either "FILIPINO", "JAPANESE", or "KOREAN" (all in uppercase, without quotes), depending on the detected language.

NoteThe first sentence ends with "po", so it is written in Filipino.The second and third sentences end with "desu" and "masu", so they are written in Japanese.The fourth sentence ends with "mnida", so it is written in Korean.

8
kamusta_po
genki_desu
ohayou_gozaimasu
annyeong_hashimnida
hajime_no_ippo
bensamu_no_sentou_houhou_ga_okama_kenpo
ang_halaman_doon_ay_sarisari_singkamasu
si_roy_mustang_ay_namamasu

FILIPINO
JAPANESE
JAPANESE
KOREAN
FILIPINO
FILIPINO
JAPANESE
JAPANESE


Your friend Jeff Zebos has been trying to run his new online company, but it's not going very well. He's not getting a lot of sales on his website which he decided to call Azamon. His big problem, you think, is that he's not ranking high enough on the search engines. If only he could rename his products to have better names than his competitors, then he'll be at the top of the search results and will be a millionaire.After doing some research, you find out that search engines only sort their results lexicographically. If your friend could rename his products to lexicographically smaller strings than his competitor's, then he'll be at the top of the rankings!To make your strategy less obvious to his competitors, you decide to swap no more than two letters of the product names.Please help Jeff to find improved names for his products that are lexicographically smaller than his competitor's!Given the string $$$s$$$ representing Jeff's product name and the string $$$c$$$ representing his competitor's product name, find a way to swap at most one pair of characters in $$$s$$$ (that is, find two distinct indices $$$i$$$ and $$$j$$$ and swap $$$s_i$$$ and $$$s_j$$$) such that the resulting new name becomes strictly lexicographically smaller than $$$c$$$, or determine that it is impossible.Note: String $$$a$$$ is strictly lexicographically smaller than string $$$b$$$ if and only if one of the following holds:  $$$a$$$ is a proper prefix of $$$b$$$, that is, $$$a$$$ is a prefix of $$$b$$$ such that $$$a \neq b$$$;  There exists an integer $$$1 \le i \le \min{(|a|, |b|)}$$$ such that $$$a_i < b_i$$$ and $$$a_j = b_j$$$ for $$$1 \le j < i$$$.

The first line of input contains a single integer $$$t$$$ ($$$1 \le t \le 1500$$$) denoting the number of test cases. The next lines contain descriptions of the test cases. Each test case consists of a single line containing two space-separated strings $$$s$$$ and $$$c$$$ ($$$2 \le |s| \le 5000, 1 \le |c| \le 5000$$$). The strings $$$s$$$ and $$$c$$$ consists of uppercase English letters. It is guaranteed that the sum of $$$|s|$$$ in the input is at most $$$5000$$$ and the sum of the $$$|c|$$$ in the input is at most $$$5000$$$.

For each test case, output a single line containing a single string, which is either   the new name which is obtained after swapping no more than one pair of characters that is strictly lexicographically smaller than $$$c$$$. In case there are many possible such strings, you can output any of them;  three dashes (the string "---" without quotes) if it is impossible.

NoteIn the first test case, it is possible to swap the second and the fourth letters of the string and the resulting string "AMAZON" is lexicographically smaller than "APPLE".It is impossible to improve the product's name in the second test case and satisfy all conditions.In the third test case, it is possible not to swap a pair of characters. The name "APPLE" is lexicographically smaller than "BANANA". Note that there are other valid answers, e.g., "APPEL".

3
AZAMON APPLE
AZAMON AAAAAAAAAAALIBABA
APPLE BANANA


Polycarp lives on the coordinate axis $$$Ox$$$ and travels from the point $$$x=a$$$ to $$$x=b$$$. It moves uniformly rectilinearly at a speed of one unit of distance per minute.On the axis $$$Ox$$$ at the point $$$x=c$$$ the base station of the mobile operator is placed. It is known that the radius of its coverage is $$$r$$$. Thus, if Polycarp is at a distance less than or equal to $$$r$$$ from the point $$$x=c$$$, then he is in the network coverage area, otherwise — no. The base station can be located both on the route of Polycarp and outside it.Print the time in minutes during which Polycarp will not be in the coverage area of the network, with a rectilinear uniform movement from $$$x=a$$$ to $$$x=b$$$. His speed — one unit of distance per minute.

The first line contains a positive integer $$$t$$$ ($$$1 \le t \le 1000$$$) — the number of test cases. In the following lines are written $$$t$$$ test cases. The description of each test case is one line, which contains four integers $$$a$$$, $$$b$$$, $$$c$$$ and $$$r$$$ ($$$-10^8 \le a,b,c \le 10^8$$$, $$$0 \le r \le 10^8$$$) — the coordinates of the starting and ending points of the path, the base station, and its coverage radius, respectively. Any of the numbers $$$a$$$, $$$b$$$ and $$$c$$$ can be equal (either any pair or all three numbers). The base station can be located both on the route of Polycarp and outside it.

Print $$$t$$$ numbers — answers to given test cases in the order they are written in the test. Each answer is an integer — the number of minutes during which Polycarp will be unavailable during his movement.

NoteThe following picture illustrates the first test case.     Polycarp goes from $$$1$$$ to $$$10$$$. The yellow area shows the coverage area of the station with a radius of coverage of $$$1$$$, which is located at the point of $$$7$$$. The green area shows a part of the path when Polycarp is out of coverage area.


This is the easy version of this problem. The only difference is the constraint on $$$k$$$ — the number of gifts in the offer. In this version: $$$k=2$$$.Vasya came to the store to buy goods for his friends for the New Year. It turned out that he was very lucky — today the offer "$$$k$$$ of goods for the price of one" is held in store. Remember, that in this problem $$$k=2$$$.Using this offer, Vasya can buy exactly $$$k$$$ of any goods, paying only for the most expensive of them. Vasya decided to take this opportunity and buy as many goods as possible for his friends with the money he has.More formally, for each good, its price is determined by $$$a_i$$$ — the number of coins it costs. Initially, Vasya has $$$p$$$ coins. He wants to buy the maximum number of goods. Vasya can perform one of the following operations as many times as necessary:  Vasya can buy one good with the index $$$i$$$ if he currently has enough coins (i.e $$$p \ge a_i$$$). After buying this good, the number of Vasya's coins will decrease by $$$a_i$$$, (i.e it becomes $$$p := p - a_i$$$).  Vasya can buy a good with the index $$$i$$$, and also choose exactly $$$k-1$$$ goods, the price of which does not exceed $$$a_i$$$, if he currently has enough coins (i.e $$$p \ge a_i$$$). Thus, he buys all these $$$k$$$ goods, and his number of coins decreases by $$$a_i$$$ (i.e it becomes $$$p := p - a_i$$$). Please note that each good can be bought no more than once.For example, if the store now has $$$n=5$$$ goods worth $$$a_1=2, a_2=4, a_3=3, a_4=5, a_5=7$$$, respectively, $$$k=2$$$, and Vasya has $$$6$$$ coins, then he can buy $$$3$$$ goods. A good with the index $$$1$$$ will be bought by Vasya without using the offer and he will pay $$$2$$$ coins. Goods with the indices $$$2$$$ and $$$3$$$ Vasya will buy using the offer and he will pay $$$4$$$ coins. It can be proved that Vasya can not buy more goods with six coins.Help Vasya to find out the maximum number of goods he can buy.

The first line contains one integer $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases in the test. The next lines contain a description of $$$t$$$ test cases.  The first line of each test case contains three integers $$$n, p, k$$$ ($$$2 \le n \le 2 \cdot 10^5$$$, $$$1 \le p \le 2\cdot10^9$$$, $$$k=2$$$) — the number of goods in the store, the number of coins Vasya has and the number of goods that can be bought by the price of the most expensive of them. The second line of each test case contains $$$n$$$ integers $$$a_i$$$ ($$$1 \le a_i \le 10^4$$$) — the prices of goods. It is guaranteed that the sum of $$$n$$$ for all test cases does not exceed $$$2 \cdot 10^5$$$. It is guaranteed that in this version of the problem $$$k=2$$$ for all test cases.

For each test case in a separate line print one integer $$$m$$$ — the maximum number of goods that Vasya can buy.


This is the hard version of this problem. The only difference is the constraint on $$$k$$$ — the number of gifts in the offer. In this version: $$$2 \le k \le n$$$.Vasya came to the store to buy goods for his friends for the New Year. It turned out that he was very lucky — today the offer "$$$k$$$ of goods for the price of one" is held in store.Using this offer, Vasya can buy exactly $$$k$$$ of any goods, paying only for the most expensive of them. Vasya decided to take this opportunity and buy as many goods as possible for his friends with the money he has.More formally, for each good, its price is determined by $$$a_i$$$ — the number of coins it costs. Initially, Vasya has $$$p$$$ coins. He wants to buy the maximum number of goods. Vasya can perform one of the following operations as many times as necessary:  Vasya can buy one good with the index $$$i$$$ if he currently has enough coins (i.e $$$p \ge a_i$$$). After buying this good, the number of Vasya's coins will decrease by $$$a_i$$$, (i.e it becomes $$$p := p - a_i$$$).  Vasya can buy a good with the index $$$i$$$, and also choose exactly $$$k-1$$$ goods, the price of which does not exceed $$$a_i$$$, if he currently has enough coins (i.e $$$p \ge a_i$$$). Thus, he buys all these $$$k$$$ goods, and his number of coins decreases by $$$a_i$$$ (i.e it becomes $$$p := p - a_i$$$). Please note that each good can be bought no more than once.For example, if the store now has $$$n=5$$$ goods worth $$$a_1=2, a_2=4, a_3=3, a_4=5, a_5=7$$$, respectively, $$$k=2$$$, and Vasya has $$$6$$$ coins, then he can buy $$$3$$$ goods. A good with the index $$$1$$$ will be bought by Vasya without using the offer and he will pay $$$2$$$ coins. Goods with the indices $$$2$$$ and $$$3$$$ Vasya will buy using the offer and he will pay $$$4$$$ coins. It can be proved that Vasya can not buy more goods with six coins.Help Vasya to find out the maximum number of goods he can buy.

The first line contains one integer $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases in the test. The next lines contain a description of $$$t$$$ test cases.  The first line of each test case contains three integers $$$n, p, k$$$ ($$$2 \le n \le 2 \cdot 10^5$$$, $$$1 \le p \le 2\cdot10^9$$$, $$$2 \le k \le n$$$) — the number of goods in the store, the number of coins Vasya has and the number of goods that can be bought by the price of the most expensive of them. The second line of each test case contains $$$n$$$ integers $$$a_i$$$ ($$$1 \le a_i \le 10^4$$$) — the prices of goods. It is guaranteed that the sum of $$$n$$$ for all test cases does not exceed $$$2 \cdot 10^5$$$.


Petya has come to the math exam and wants to solve as many problems as possible. He prepared and carefully studied the rules by which the exam passes.The exam consists of $$$n$$$ problems that can be solved in $$$T$$$ minutes. Thus, the exam begins at time $$$0$$$ and ends at time $$$T$$$. Petya can leave the exam at any integer time from $$$0$$$ to $$$T$$$, inclusive.All problems are divided into two types:   easy problems — Petya takes exactly $$$a$$$ minutes to solve any easy problem;  hard problems — Petya takes exactly $$$b$$$ minutes ($$$b > a$$$) to solve any hard problem. Thus, if Petya starts solving an easy problem at time $$$x$$$, then it will be solved at time $$$x+a$$$. Similarly, if at a time $$$x$$$ Petya starts to solve a hard problem, then it will be solved at time $$$x+b$$$.For every problem, Petya knows if it is easy or hard. Also, for each problem is determined time $$$t_i$$$ ($$$0 \le t_i \le T$$$) at which it will become mandatory (required). If Petya leaves the exam at time $$$s$$$ and there is such a problem $$$i$$$ that $$$t_i \le s$$$ and he didn't solve it, then he will receive $$$0$$$ points for the whole exam. Otherwise (i.e if he has solved all such problems for which $$$t_i \le s$$$) he will receive a number of points equal to the number of solved problems. Note that leaving at time $$$s$$$ Petya can have both "mandatory" and "non-mandatory" problems solved.For example, if $$$n=2$$$, $$$T=5$$$, $$$a=2$$$, $$$b=3$$$, the first problem is hard and $$$t_1=3$$$ and the second problem is easy and $$$t_2=2$$$. Then:  if he leaves at time $$$s=0$$$, then he will receive $$$0$$$ points since he will not have time to solve any problems;  if he leaves at time $$$s=1$$$, he will receive $$$0$$$ points since he will not have time to solve any problems;  if he leaves at time $$$s=2$$$, then he can get a $$$1$$$ point by solving the problem with the number $$$2$$$ (it must be solved in the range from $$$0$$$ to $$$2$$$);  if he leaves at time $$$s=3$$$, then he will receive $$$0$$$ points since at this moment both problems will be mandatory, but he will not be able to solve both of them;  if he leaves at time $$$s=4$$$, then he will receive $$$0$$$ points since at this moment both problems will be mandatory, but he will not be able to solve both of them;  if he leaves at time $$$s=5$$$, then he can get $$$2$$$ points by solving all problems. Thus, the answer to this test is $$$2$$$.Help Petya to determine the maximal number of points that he can receive, before leaving the exam.

The first line contains the integer $$$m$$$ ($$$1 \le m \le 10^4$$$) — the number of test cases in the test. The next lines contain a description of $$$m$$$ test cases.  The first line of each test case contains four integers $$$n, T, a, b$$$ ($$$2 \le n \le 2\cdot10^5$$$, $$$1 \le T \le 10^9$$$, $$$1 \le a < b \le 10^9$$$) — the number of problems, minutes given for the exam and the time to solve an easy and hard problem, respectively. The second line of each test case contains $$$n$$$ numbers $$$0$$$ or $$$1$$$, separated by single space: the $$$i$$$-th number means the type of the $$$i$$$-th problem. A value of $$$0$$$ means that the problem is easy, and a value of $$$1$$$ that the problem is hard. The third line of each test case contains $$$n$$$ integers $$$t_i$$$ ($$$0 \le t_i \le T$$$), where the $$$i$$$-th number means the time at which the $$$i$$$-th problem will become mandatory. It is guaranteed that the sum of $$$n$$$ for all test cases does not exceed $$$2\cdot10^5$$$.

Print the answers to $$$m$$$ test cases. For each set, print a single integer — maximal number of points that he can receive, before leaving the exam.


You are an intergalactic surgeon and you have an alien patient. For the purposes of this problem, we can and we will model this patient's body using a $$$2 \times (2k + 1)$$$ rectangular grid. The alien has $$$4k + 1$$$ distinct organs, numbered $$$1$$$ to $$$4k + 1$$$.In healthy such aliens, the organs are arranged in a particular way. For example, here is how the organs of a healthy such alien would be positioned, when viewed from the top, for $$$k = 4$$$:  Here, the E represents empty space. In general, the first row contains organs $$$1$$$ to $$$2k + 1$$$ (in that order from left to right), and the second row contains organs $$$2k + 2$$$ to $$$4k + 1$$$ (in that order from left to right) and then empty space right after. Your patient's organs are complete, and inside their body, but they somehow got shuffled around! Your job, as an intergalactic surgeon, is to put everything back in its correct position. All organs of the alien must be in its body during the entire procedure. This means that at any point during the procedure, there is exactly one cell (in the grid) that is empty. In addition, you can only move organs around by doing one of the following things:  You can switch the positions of the empty space E with any organ to its immediate left or to its immediate right (if they exist). In reality, you do this by sliding the organ in question to the empty space;  You can switch the positions of the empty space E with any organ to its immediate top or its immediate bottom (if they exist) only if the empty space is on the leftmost column, rightmost column or in the centermost column. Again, you do this by sliding the organ in question to the empty space. Your job is to figure out a sequence of moves you must do during the surgical procedure in order to place back all $$$4k + 1$$$ internal organs of your patient in the correct cells. If it is impossible to do so, you must say so.

The first line of input contains a single integer $$$t$$$ ($$$1 \le t \le 4$$$) denoting the number of test cases. The next lines contain descriptions of the test cases. Each test case consists of three lines. The first line contains a single integer $$$k$$$ ($$$1 \le k \le 15$$$) which determines the size of the grid. Then two lines follow. Each of them contains $$$2k + 1$$$ space-separated integers or the letter E. They describe the first and second rows of organs, respectively. It is guaranteed that all $$$4k + 1$$$ organs are present and there is exactly one E.

For each test case, first, print a single line containing either:   SURGERY COMPLETE if it is possible to place back all internal organs in the correct locations;  SURGERY FAILED if it is impossible.  If it is impossible, then this is the only line of output for the test case. However, if it is possible, output a few more lines describing the sequence of moves to place the organs in the correct locations.  The sequence of moves will be a (possibly empty) string of letters u, d, l or r, representing sliding the organ that's directly above, below, to the left or to the right of the empty space, respectively, into the empty space. Print the sequence of moves in the following line, as such a string.  For convenience, you may use shortcuts to reduce the size of your output. You may use uppercase letters as shortcuts for sequences of moves. For example, you could choose T to represent the string lddrr. These shortcuts may also include other shortcuts on their own! For example, you could choose E to represent TruT, etc. You may use any number of uppercase letters (including none) as shortcuts. The only requirements are the following:   The total length of all strings in your output for a single case is at most $$$10^4$$$;  There must be no cycles involving the shortcuts that are reachable from the main sequence;  The resulting sequence of moves is finite, after expanding all shortcuts. Note that the final sequence of moves (after expanding) may be much longer than $$$10^4$$$; the only requirement is that it's finite.  As an example, if T = lddrr, E = TruT and R = rrr, then TurTlER expands to:   TurTlER  lddrrurTlER  lddrrurlddrrlER  lddrrurlddrrlTruTR  lddrrurlddrrllddrrruTR  lddrrurlddrrllddrrrulddrrR  lddrrurlddrrllddrrrulddrrrrr  To use shortcuts, print each one of them in a single line as the uppercase letter, then space, and then the string that this shortcut represents. They may be printed in any order. At the end of all of those, print a single line containing DONE.  Note: You still need to print DONE even if you don't plan on using shortcuts. Your sequence does not need to be the shortest. Any valid sequence of moves (satisfying the requirements above) will be accepted.

NoteThere are three shortcuts defined in the first sample output:  R = SrS  S = rr  I = lldll The sequence of moves is IR and it expands to:  IR  lldllR  lldllSrS  lldllrrrS  lldllrrrrr

SURGERY COMPLETE
IR
R SrS
S rr
I lldll
DONE
SURGERY FAILED


This is an interactive problem.After completing the last level of the enchanted temple, you received a powerful artifact of the 255th level. Do not rush to celebrate, because this artifact has a powerful rune that can be destroyed with a single spell $$$s$$$, which you are going to find. We define the spell as some non-empty string consisting only of the letters a and b.At any time, you can cast an arbitrary non-empty spell $$$t$$$, and the rune on the artifact will begin to resist. Resistance of the rune is the edit distance between the strings that specify the casted spell $$$t$$$ and the rune-destroying spell $$$s$$$.Edit distance of two strings $$$s$$$ and $$$t$$$ is a value equal to the minimum number of one-character operations of replacing, inserting and deleting characters in $$$s$$$ to get $$$t$$$. For example, the distance between ababa and aaa is $$$2$$$, the distance between aaa and aba is $$$1$$$, the distance between bbaba and abb is $$$3$$$. The edit distance is $$$0$$$ if and only if the strings are equal.It is also worth considering that the artifact has a resistance limit  — if you cast more than $$$n + 2$$$ spells, where $$$n$$$ is the length of spell $$$s$$$, the rune will be blocked.Thus, it takes $$$n + 2$$$ or fewer spells to destroy the rune that is on your artifact. Keep in mind that the required destructive spell $$$s$$$ must also be counted among these $$$n + 2$$$ spells.Note that the length $$$n$$$ of the rune-destroying spell $$$s$$$ is not known to you in advance. It is only known that its length $$$n$$$ does not exceed $$$300$$$.


We are committed to the well being of all participants. Therefore, instead of the problem, we suggest you enjoy a piece of cake.Uh oh. Somebody cut the cake. We told them to wait for you, but they did it anyway. There is still some left, though, if you hurry back. Of course, before you taste the cake, you thought about how the cake was cut.It is known that the cake was originally a regular $$$n$$$-sided polygon, each vertex of which had a unique number from $$$1$$$ to $$$n$$$. The vertices were numbered in random order.Each piece of the cake is a triangle. The cake was cut into $$$n - 2$$$ pieces as follows: each time one cut was made with a knife (from one vertex to another) such that exactly one triangular piece was separated from the current cake, and the rest continued to be a convex polygon. In other words, each time three consecutive vertices of the polygon were selected and the corresponding triangle was cut off.A possible process of cutting the cake is presented in the picture below.    Example of 6-sided cake slicing. You are given a set of $$$n-2$$$ triangular pieces in random order. The vertices of each piece are given in random order — clockwise or counterclockwise. Each piece is defined by three numbers — the numbers of the corresponding $$$n$$$-sided cake vertices.For example, for the situation in the picture above, you could be given a set of pieces: $$$[3, 6, 5], [5, 2, 4], [5, 4, 6], [6, 3, 1]$$$.You are interested in two questions.  What was the enumeration of the $$$n$$$-sided cake vertices?  In what order were the pieces cut? Formally, you have to find two permutations $$$p_1, p_2, \dots, p_n$$$ ($$$1 \le p_i \le n$$$) and $$$q_1, q_2, \dots, q_{n - 2}$$$ ($$$1 \le q_i \le n - 2$$$) such that if the cake vertices are numbered with the numbers $$$p_1, p_2, \dots, p_n$$$ in order clockwise or counterclockwise, then when cutting pieces of the cake in the order $$$q_1, q_2, \dots, q_{n - 2}$$$ always cuts off a triangular piece so that the remaining part forms one convex polygon.For example, in the picture above the answer permutations could be: $$$p=[2, 4, 6, 1, 3, 5]$$$ (or any of its cyclic shifts, or its reversal and after that any cyclic shift) and $$$q=[2, 4, 1, 3]$$$.Write a program that, based on the given triangular pieces, finds any suitable permutations $$$p$$$ and $$$q$$$.

The first line contains a single integer $$$t$$$ ($$$1 \le t \le 1000$$$) — the number of test cases. Then there are $$$t$$$ independent sets of input data. The first line of each set consists of a single integer $$$n$$$ ($$$3 \le n \le 10^5$$$) — the number of vertices in the cake. The following $$$n - 2$$$ lines describe the numbers of the pieces vertices: each line consists of three different integers $$$a, b, c$$$ ($$$1 \le a, b, c \le n$$$) — the numbers of the pieces vertices of cake given in random order. The pieces are given in random order. It is guaranteed that the answer to each of the tests exists. It is also guaranteed that the sum of $$$n$$$ for all test cases does not exceed $$$10^5$$$.

Print $$$2t$$$ lines — answers to given $$$t$$$ test cases in the order in which they are written in the input. Each answer should consist of $$$2$$$ lines. In the first line of an answer on a test case print $$$n$$$ distinct numbers $$$p_1, p_2, \dots, p_n$$$($$$1 \le p_i \le n$$$) — the numbers of the cake vertices in clockwise or counterclockwise order. In the second line of an answer on a test case print $$$n - 2$$$ distinct numbers $$$q_1, q_2, \dots, q_{n - 2}$$$($$$1 \le q_i \le n - 2$$$) — the order of cutting pieces of the cake. The number of a piece of the cake corresponds to its number in the input. If there are several answers, print any. It is guaranteed that the answer to each of the tests exists.


Santa has $$$n$$$ candies and he wants to gift them to $$$k$$$ kids. He wants to divide as many candies as possible between all $$$k$$$ kids. Santa can't divide one candy into parts but he is allowed to not use some candies at all.Suppose the kid who recieves the minimum number of candies has $$$a$$$ candies and the kid who recieves the maximum number of candies has $$$b$$$ candies. Then Santa will be satisfied, if the both conditions are met at the same time:  $$$b - a \le 1$$$ (it means $$$b = a$$$ or $$$b = a + 1$$$);  the number of kids who has $$$a+1$$$ candies (note that $$$a+1$$$ not necessarily equals $$$b$$$) does not exceed $$$\lfloor\frac{k}{2}\rfloor$$$ (less than or equal to $$$\lfloor\frac{k}{2}\rfloor$$$). $$$\lfloor\frac{k}{2}\rfloor$$$ is $$$k$$$ divided by $$$2$$$ and rounded down to the nearest integer. For example, if $$$k=5$$$ then $$$\lfloor\frac{k}{2}\rfloor=\lfloor\frac{5}{2}\rfloor=2$$$.Your task is to find the maximum number of candies Santa can give to kids so that he will be satisfied.You have to answer $$$t$$$ independent test cases.

The first line of the input contains one integer $$$t$$$ ($$$1 \le t \le 5 \cdot 10^4$$$) — the number of test cases. The next $$$t$$$ lines describe test cases. The $$$i$$$-th test case contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le n, k \le 10^9$$$) — the number of candies and the number of kids.

For each test case print the answer on it — the maximum number of candies Santa can give to kids so that he will be satisfied.

NoteIn the first test case, Santa can give $$$3$$$ and $$$2$$$ candies to kids. There $$$a=2, b=3,a+1=3$$$.In the second test case, Santa can give $$$5, 5, 4$$$ and $$$4$$$ candies. There $$$a=4,b=5,a+1=5$$$. The answer cannot be greater because then the number of kids with $$$5$$$ candies will be $$$3$$$.In the third test case, Santa can distribute candies in the following way: $$$[1, 2, 2, 1, 1, 2, 1]$$$. There $$$a=1,b=2,a+1=2$$$. He cannot distribute two remaining candies in a way to be satisfied.In the fourth test case, Santa can distribute candies in the following way: $$$[3, 3]$$$. There $$$a=3, b=3, a+1=4$$$. Santa distributed all $$$6$$$ candies.


New Year is coming and you are excited to know how many minutes remain before the New Year. You know that currently the clock shows $$$h$$$ hours and $$$m$$$ minutes, where $$$0 \le hh < 24$$$ and $$$0 \le mm < 60$$$. We use 24-hour time format!Your task is to find the number of minutes before the New Year. You know that New Year comes when the clock shows $$$0$$$ hours and $$$0$$$ minutes.You have to answer $$$t$$$ independent test cases.

The first line of the input contains one integer $$$t$$$ ($$$1 \le t \le 1439$$$) — the number of test cases. The following $$$t$$$ lines describe test cases. The $$$i$$$-th line contains the time as two integers $$$h$$$ and $$$m$$$ ($$$0 \le h < 24$$$, $$$0 \le m < 60$$$). It is guaranteed that this time is not a midnight, i.e. the following two conditions can't be met at the same time: $$$h=0$$$ and $$$m=0$$$. It is guaranteed that both $$$h$$$ and $$$m$$$ are given without leading zeros.

For each test case, print the answer on it — the number of minutes before the New Year.


There are $$$n$$$ friends who want to give gifts for the New Year to each other. Each friend should give exactly one gift and receive exactly one gift. The friend cannot give the gift to himself.For each friend the value $$$f_i$$$ is known: it is either $$$f_i = 0$$$ if the $$$i$$$-th friend doesn't know whom he wants to give the gift to or $$$1 \le f_i \le n$$$ if the $$$i$$$-th friend wants to give the gift to the friend $$$f_i$$$.You want to fill in the unknown values ($$$f_i = 0$$$) in such a way that each friend gives exactly one gift and receives exactly one gift and there is no friend who gives the gift to himself. It is guaranteed that the initial information isn't contradictory.If there are several answers, you can print any.

The first line of the input contains one integer $$$n$$$ ($$$2 \le n \le 2 \cdot 10^5$$$) — the number of friends. The second line of the input contains $$$n$$$ integers $$$f_1, f_2, \dots, f_n$$$ ($$$0 \le f_i \le n$$$, $$$f_i \ne i$$$, all $$$f_i \ne 0$$$ are distinct), where $$$f_i$$$ is the either $$$f_i = 0$$$ if the $$$i$$$-th friend doesn't know whom he wants to give the gift to or $$$1 \le f_i \le n$$$ if the $$$i$$$-th friend wants to give the gift to the friend $$$f_i$$$. It is also guaranteed that there is at least two values $$$f_i = 0$$$.

Print $$$n$$$ integers $$$nf_1, nf_2, \dots, nf_n$$$, where $$$nf_i$$$ should be equal to $$$f_i$$$ if $$$f_i \ne 0$$$ or the number of friend whom the $$$i$$$-th friend wants to give the gift to. All values $$$nf_i$$$ should be distinct, $$$nf_i$$$ cannot be equal to $$$i$$$. Each friend gives exactly one gift and receives exactly one gift and there is no friend who gives the gift to himself. If there are several answers, you can print any.


There are $$$n$$$ Christmas trees on an infinite number line. The $$$i$$$-th tree grows at the position $$$x_i$$$. All $$$x_i$$$ are guaranteed to be distinct.Each integer point can be either occupied by the Christmas tree, by the human or not occupied at all. Non-integer points cannot be occupied by anything.There are $$$m$$$ people who want to celebrate Christmas. Let $$$y_1, y_2, \dots, y_m$$$ be the positions of people (note that all values $$$x_1, x_2, \dots, x_n, y_1, y_2, \dots, y_m$$$ should be distinct and all $$$y_j$$$ should be integer). You want to find such an arrangement of people that the value $$$\sum\limits_{j=1}^{m}\min\limits_{i=1}^{n}|x_i - y_j|$$$ is the minimum possible (in other words, the sum of distances to the nearest Christmas tree for all people should be minimized).In other words, let $$$d_j$$$ be the distance from the $$$j$$$-th human to the nearest Christmas tree ($$$d_j = \min\limits_{i=1}^{n} |y_j - x_i|$$$). Then you need to choose such positions $$$y_1, y_2, \dots, y_m$$$ that $$$\sum\limits_{j=1}^{m} d_j$$$ is the minimum possible.

The first line of the input contains two integers $$$n$$$ and $$$m$$$ ($$$1 \le n, m \le 2 \cdot 10^5$$$) — the number of Christmas trees and the number of people. The second line of the input contains $$$n$$$ integers $$$x_1, x_2, \dots, x_n$$$ ($$$-10^9 \le x_i \le 10^9$$$), where $$$x_i$$$ is the position of the $$$i$$$-th Christmas tree. It is guaranteed that all $$$x_i$$$ are distinct.

In the first line print one integer $$$res$$$ — the minimum possible value of $$$\sum\limits_{j=1}^{m}\min\limits_{i=1}^{n}|x_i - y_j|$$$ (in other words, the sum of distances to the nearest Christmas tree for all people). In the second line print $$$m$$$ integers $$$y_1, y_2, \dots, y_m$$$ ($$$-2 \cdot 10^9 \le y_j \le 2 \cdot 10^9$$$), where $$$y_j$$$ is the position of the $$$j$$$-th human. All $$$y_j$$$ should be distinct and all values $$$x_1, x_2, \dots, x_n, y_1, y_2, \dots, y_m$$$ should be distinct. If there are multiple answers, print any of them.


Oh, New Year. The time to gather all your friends and reflect on the heartwarming events of the past year...$$$n$$$ friends live in a city which can be represented as a number line. The $$$i$$$-th friend lives in a house with an integer coordinate $$$x_i$$$. The $$$i$$$-th friend can come celebrate the New Year to the house with coordinate $$$x_i-1$$$, $$$x_i+1$$$ or stay at $$$x_i$$$. Each friend is allowed to move no more than once.For all friends $$$1 \le x_i \le n$$$ holds, however, they can come to houses with coordinates $$$0$$$ and $$$n+1$$$ (if their houses are at $$$1$$$ or $$$n$$$, respectively).For example, let the initial positions be $$$x = [1, 2, 4, 4]$$$. The final ones then can be $$$[1, 3, 3, 4]$$$, $$$[0, 2, 3, 3]$$$, $$$[2, 2, 5, 5]$$$, $$$[2, 1, 3, 5]$$$ and so on. The number of occupied houses is the number of distinct positions among the final ones.So all friends choose the moves they want to perform. After that the number of occupied houses is calculated. What is the minimum and the maximum number of occupied houses can there be?

The first line contains a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^5$$$) — the number of friends. The second line contains $$$n$$$ integers $$$x_1, x_2, \dots, x_n$$$ ($$$1 \le x_i \le n$$$) — the coordinates of the houses of the friends.

Print two integers — the minimum and the maximum possible number of occupied houses after all moves are performed.

NoteIn the first example friends can go to $$$[2, 2, 3, 3]$$$. So friend $$$1$$$ goes to $$$x_1+1$$$, friend $$$2$$$ stays at his house $$$x_2$$$, friend $$$3$$$ goes to $$$x_3-1$$$ and friend $$$4$$$ goes to $$$x_4-1$$$. $$$[1, 1, 3, 3]$$$, $$$[2, 2, 3, 3]$$$ or $$$[2, 2, 4, 4]$$$ are also all valid options to obtain $$$2$$$ occupied houses.For the maximum number of occupied houses friends can go to $$$[1, 2, 3, 4]$$$ or to $$$[0, 2, 4, 5]$$$, for example.


Polycarp has decided to decorate his room because the New Year is soon. One of the main decorations that Polycarp will install is the garland he is going to solder himself.Simple garlands consisting of several lamps connected by one wire are too boring for Polycarp. He is going to solder a garland consisting of $$$n$$$ lamps and $$$n - 1$$$ wires. Exactly one lamp will be connected to power grid, and power will be transmitted from it to other lamps by the wires. Each wire connectes exactly two lamps; one lamp is called the main lamp for this wire (the one that gets power from some other wire and transmits it to this wire), the other one is called the auxiliary lamp (the one that gets power from this wire). Obviously, each lamp has at most one wire that brings power to it (and this lamp is the auxiliary lamp for this wire, and the main lamp for all other wires connected directly to it).Each lamp has a brightness value associated with it, the $$$i$$$-th lamp has brightness $$$2^i$$$. We define the importance of the wire as the sum of brightness values over all lamps that become disconnected from the grid if the wire is cut (and all other wires are still working).Polycarp has drawn the scheme of the garland he wants to make (the scheme depicts all $$$n$$$ lamp and $$$n - 1$$$ wires, and the lamp that will be connected directly to the grid is marked; the wires are placed in such a way that the power can be transmitted to each lamp). After that, Polycarp calculated the importance of each wire, enumerated them from $$$1$$$ to $$$n - 1$$$ in descending order of their importance, and then wrote the index of the main lamp for each wire (in the order from the first wire to the last one).The following day Polycarp bought all required components of the garland and decided to solder it — but he could not find the scheme. Fortunately, Polycarp found the list of indices of main lamps for all wires. Can you help him restore the original scheme?

The first line contains one integer $$$n$$$ ($$$2 \le n \le 2 \cdot 10^5$$$) — the number of lamps. The second line contains $$$n - 1$$$ integers $$$a_1$$$, $$$a_2$$$, ..., $$$a_{n - 1}$$$ ($$$1 \le a_i \le n$$$), where $$$a_i$$$ is the index of the main lamp for the $$$i$$$-th wire (wires are numbered in descending order of importance).

If it is impossible to restore the original scheme, print one integer $$$-1$$$. Otherwise print the scheme as follows. In the first line, print one integer $$$k$$$ ($$$1 \le k \le n$$$) — the index of the lamp that is connected to the power grid. Then print $$$n - 1$$$ lines, each containing two integers $$$x_i$$$ and $$$y_i$$$ ($$$1 \le x_i, y_i \le n$$$, $$$x_i \ne y_i$$$) — the indices of the lamps connected by some wire. The descriptions of the wires (and the lamps connected by a wire) can be printed in any order. The printed description must correspond to a scheme of a garland such that Polycarp could have written the list $$$a_1$$$, $$$a_2$$$, ..., $$$a_{n - 1}$$$ from it. If there are multiple such schemes, output any of them.

NoteThe scheme for the first example (R denotes the lamp connected to the grid, the numbers on wires are their importance values):


Happy new year! The year 2020 is also known as Year Gyeongja (경자년, gyeongja-nyeon) in Korea. Where did the name come from? Let's briefly look at the Gapja system, which is traditionally used in Korea to name the years.There are two sequences of $$$n$$$ strings $$$s_1, s_2, s_3, \ldots, s_{n}$$$ and $$$m$$$ strings $$$t_1, t_2, t_3, \ldots, t_{m}$$$. These strings contain only lowercase letters. There might be duplicates among these strings.Let's call a concatenation of strings $$$x$$$ and $$$y$$$ as the string that is obtained by writing down strings $$$x$$$ and $$$y$$$ one right after another without changing the order. For example, the concatenation of the strings "code" and "forces" is the string "codeforces".The year 1 has a name which is the concatenation of the two strings $$$s_1$$$ and $$$t_1$$$. When the year increases by one, we concatenate the next two strings in order from each of the respective sequences. If the string that is currently being used is at the end of its sequence, we go back to the first string in that sequence.For example, if $$$n = 3, m = 4, s = $$${"a", "b", "c"}, $$$t =$$$ {"d", "e", "f", "g"}, the following table denotes the resulting year names. Note that the names of the years may repeat.  You are given two sequences of strings of size $$$n$$$ and $$$m$$$ and also $$$q$$$ queries. For each query, you will be given the current year. Could you find the name corresponding to the given year, according to the Gapja system?

The first line contains two integers $$$n, m$$$ ($$$1 \le n, m \le 20$$$). The next line contains $$$n$$$ strings $$$s_1, s_2, \ldots, s_{n}$$$. Each string contains only lowercase letters, and they are separated by spaces. The length of each string is at least $$$1$$$ and at most $$$10$$$. The next line contains $$$m$$$ strings $$$t_1, t_2, \ldots, t_{m}$$$. Each string contains only lowercase letters, and they are separated by spaces. The length of each string is at least $$$1$$$ and at most $$$10$$$. Among the given $$$n + m$$$ strings may be duplicates (that is, they are not necessarily all different). The next line contains a single integer $$$q$$$ ($$$1 \le q \le 2\,020$$$). In the next $$$q$$$ lines, an integer $$$y$$$ ($$$1 \le y \le 10^9$$$) is given, denoting the year we want to know the name for.

Print $$$q$$$ lines. For each line, print the name of the year as per the rule described above.

NoteThe first example denotes the actual names used in the Gapja system. These strings usually are either a number or the name of some animal.

10 12
sin im gye gap eul byeong jeong mu gi gyeong
yu sul hae ja chuk in myo jin sa o mi sin
14
1
2
3
4
10
11
12
13
73
2016
2017
2018
2019
2020

sinyu
imsul
gyehae
gapja
gyeongo
sinmi
imsin
gyeyu
gyeyu
byeongsin
jeongyu
musul
gihae
gyeongja


Donghyun's new social network service (SNS) contains $$$n$$$ users numbered $$$1, 2, \ldots, n$$$. Internally, their network is a tree graph, so there are $$$n-1$$$ direct connections between each user. Each user can reach every other users by using some sequence of direct connections. From now on, we will denote this primary network as $$$T_1$$$.To prevent a possible server breakdown, Donghyun created a backup network $$$T_2$$$, which also connects the same $$$n$$$ users via a tree graph. If a system breaks down, exactly one edge $$$e \in T_1$$$ becomes unusable. In this case, Donghyun will protect the edge $$$e$$$ by picking another edge $$$f \in T_2$$$, and add it to the existing network. This new edge should make the network be connected again. Donghyun wants to assign a replacement edge $$$f \in T_2$$$ for as many edges $$$e \in T_1$$$ as possible. However, since the backup network $$$T_2$$$ is fragile, $$$f \in T_2$$$ can be assigned as the replacement edge for at most one edge in $$$T_1$$$. With this restriction, Donghyun wants to protect as many edges in $$$T_1$$$ as possible.Formally, let $$$E(T)$$$ be an edge set of the tree $$$T$$$. We consider a bipartite graph with two parts $$$E(T_1)$$$ and $$$E(T_2)$$$. For $$$e \in E(T_1), f \in E(T_2)$$$, there is an edge connecting $$$\{e, f\}$$$ if and only if graph $$$T_1 - \{e\} + \{f\}$$$ is a tree. You should find a maximum matching in this bipartite graph.

The first line contains an integer $$$n$$$ ($$$2 \le n \le 250\,000$$$), the number of users.  In the next $$$n-1$$$ lines, two integers $$$a_i$$$, $$$b_i$$$ ($$$1 \le a_i, b_i \le n$$$) are given. Those two numbers denote the indices of the vertices connected by the corresponding edge in $$$T_1$$$. In the next $$$n-1$$$ lines, two integers $$$c_i$$$, $$$d_i$$$ ($$$1 \le c_i, d_i \le n$$$) are given. Those two numbers denote the indices of the vertices connected by the corresponding edge in $$$T_2$$$.  It is guaranteed that both edge sets form a tree of size $$$n$$$.

In the first line, print the number $$$m$$$ ($$$0 \leq m < n$$$), the maximum number of edges that can be protected. In the next $$$m$$$ lines, print four integers $$$a_i, b_i, c_i, d_i$$$. Those four numbers denote that the edge $$$(a_i, b_i)$$$ in $$$T_1$$$ is will be replaced with an edge $$$(c_i, d_i)$$$ in $$$T_2$$$. All printed edges should belong to their respective network, and they should link to distinct edges in their respective network. If one removes an edge $$$(a_i, b_i)$$$ from $$$T_1$$$ and adds edge $$$(c_i, d_i)$$$ from $$$T_2$$$, the network should remain connected. The order of printing the edges or the order of vertices in each edge does not matter. If there are several solutions, you can print any.


Recall that the permutation is an array consisting of $$$n$$$ distinct integers from $$$1$$$ to $$$n$$$ in arbitrary order. For example, $$$[2,3,1,5,4]$$$ is a permutation, but $$$[1,2,2]$$$ is not a permutation ($$$2$$$ appears twice in the array) and $$$[1,3,4]$$$ is also not a permutation ($$$n=3$$$ but there is $$$4$$$ in the array).A sequence $$$a$$$ is a subsegment of a sequence $$$b$$$ if $$$a$$$ can be obtained from $$$b$$$ by deletion of several (possibly, zero or all) elements from the beginning and several (possibly, zero or all) elements from the end. We will denote the subsegments as $$$[l, r]$$$, where $$$l, r$$$ are two integers with $$$1 \le l \le r \le n$$$. This indicates the subsegment where $$$l-1$$$ elements from the beginning and $$$n-r$$$ elements from the end are deleted from the sequence.For a permutation $$$p_1, p_2, \ldots, p_n$$$, we define a framed segment as a subsegment $$$[l,r]$$$ where $$$\max\{p_l, p_{l+1}, \dots, p_r\} - \min\{p_l, p_{l+1}, \dots, p_r\} = r - l$$$. For example, for the permutation $$$(6, 7, 1, 8, 5, 3, 2, 4)$$$ some of its framed segments are: $$$[1, 2], [5, 8], [6, 7], [3, 3], [8, 8]$$$. In particular, a subsegment $$$[i,i]$$$ is always a framed segments for any $$$i$$$ between $$$1$$$ and $$$n$$$, inclusive.We define the happiness of a permutation $$$p$$$ as the number of pairs $$$(l, r)$$$ such that $$$1 \le l \le r \le n$$$, and $$$[l, r]$$$ is a framed segment. For example, the permutation $$$[3, 1, 2]$$$ has happiness $$$5$$$: all segments except $$$[1, 2]$$$ are framed segments.Given integers $$$n$$$ and $$$m$$$, Jongwon wants to compute the sum of happiness for all permutations of length $$$n$$$, modulo the prime number $$$m$$$. Note that there exist $$$n!$$$ (factorial of $$$n$$$) different permutations of length $$$n$$$.

Print $$$r$$$ ($$$0 \le r < m$$$), the sum of happiness for all permutations of length $$$n$$$, modulo a prime number $$$m$$$.

NoteFor sample input $$$n=3$$$, let's consider all permutations of length $$$3$$$:  $$$[1, 2, 3]$$$, all subsegments are framed segment. Happiness is $$$6$$$.  $$$[1, 3, 2]$$$, all subsegments except $$$[1, 2]$$$ are framed segment. Happiness is $$$5$$$.  $$$[2, 1, 3]$$$, all subsegments except $$$[2, 3]$$$ are framed segment. Happiness is $$$5$$$.  $$$[2, 3, 1]$$$, all subsegments except $$$[2, 3]$$$ are framed segment. Happiness is $$$5$$$.  $$$[3, 1, 2]$$$, all subsegments except $$$[1, 2]$$$ are framed segment. Happiness is $$$5$$$.  $$$[3, 2, 1]$$$, all subsegments are framed segment. Happiness is $$$6$$$. Thus, the sum of happiness is $$$6+5+5+5+5+6 = 32$$$.


A sequence $$$a = [a_1, a_2, \ldots, a_l]$$$ of length $$$l$$$ has an ascent if there exists a pair of indices $$$(i, j)$$$ such that $$$1 \le i < j \le l$$$ and $$$a_i < a_j$$$. For example, the sequence $$$[0, 2, 0, 2, 0]$$$ has an ascent because of the pair $$$(1, 4)$$$, but the sequence $$$[4, 3, 3, 3, 1]$$$ doesn't have an ascent.Let's call a concatenation of sequences $$$p$$$ and $$$q$$$ the sequence that is obtained by writing down sequences $$$p$$$ and $$$q$$$ one right after another without changing the order. For example, the concatenation of the $$$[0, 2, 0, 2, 0]$$$ and $$$[4, 3, 3, 3, 1]$$$ is the sequence $$$[0, 2, 0, 2, 0, 4, 3, 3, 3, 1]$$$. The concatenation of sequences $$$p$$$ and $$$q$$$ is denoted as $$$p+q$$$.Gyeonggeun thinks that sequences with ascents bring luck. Therefore, he wants to make many such sequences for the new year. Gyeonggeun has $$$n$$$ sequences $$$s_1, s_2, \ldots, s_n$$$ which may have different lengths. Gyeonggeun will consider all $$$n^2$$$ pairs of sequences $$$s_x$$$ and $$$s_y$$$ ($$$1 \le x, y \le n$$$), and will check if its concatenation $$$s_x + s_y$$$ has an ascent. Note that he may select the same sequence twice, and the order of selection matters.Please count the number of pairs ($$$x, y$$$) of sequences $$$s_1, s_2, \ldots, s_n$$$ whose concatenation $$$s_x + s_y$$$ contains an ascent.

The first line contains the number $$$n$$$ ($$$1 \le n \le 100\,000$$$) denoting the number of sequences. The next $$$n$$$ lines contain the number $$$l_i$$$ ($$$1 \le l_i$$$) denoting the length of $$$s_i$$$, followed by $$$l_i$$$ integers $$$s_{i, 1}, s_{i, 2}, \ldots, s_{i, l_i}$$$ ($$$0 \le s_{i, j} \le 10^6$$$) denoting the sequence $$$s_i$$$.  It is guaranteed that the sum of all $$$l_i$$$ does not exceed $$$100\,000$$$.

Print a single integer, the number of pairs of sequences whose concatenation has an ascent.

NoteFor the first example, the following $$$9$$$ arrays have an ascent: $$$[1, 2], [1, 2], [1, 3], [1, 3], [1, 4], [1, 4], [2, 3], [2, 4], [3, 4]$$$. Arrays with the same contents are counted as their occurences.


Kiwon's favorite video game is now holding a new year event to motivate the users! The game is about building and defending a castle, which led Kiwon to think about the following puzzle.In a 2-dimension plane, you have a set $$$s = \{(x_1, y_1), (x_2, y_2), \ldots, (x_n, y_n)\}$$$ consisting of $$$n$$$ distinct points. In the set $$$s$$$, no three distinct points lie on a single line. For a point $$$p \in s$$$, we can protect this point by building a castle. A castle is a simple quadrilateral (polygon with $$$4$$$ vertices) that strictly encloses the point $$$p$$$ (i.e. the point $$$p$$$ is strictly inside a quadrilateral). Kiwon is interested in the number of $$$4$$$-point subsets of $$$s$$$ that can be used to build a castle protecting $$$p$$$. Note that, if a single subset can be connected in more than one way to enclose a point, it is counted only once. Let $$$f(p)$$$ be the number of $$$4$$$-point subsets that can enclose the point $$$p$$$. Please compute the sum of $$$f(p)$$$ for all points $$$p \in s$$$.

The first line contains a single integer $$$n$$$ ($$$5 \le n \le 2\,500$$$). In the next $$$n$$$ lines, two integers $$$x_i$$$ and $$$y_i$$$ ($$$-10^9 \le x_i, y_i \le 10^9$$$) denoting the position of points are given. It is guaranteed that all points are distinct, and there are no three collinear points.

Print the sum of $$$f(p)$$$ for all points $$$p \in s$$$.


It is only a few days until Seollal (Korean Lunar New Year), and Jaehyun has invited his family to his garden. There are kids among the guests. To make the gathering more fun for the kids, Jaehyun is going to run a game of hide-and-seek.The garden can be represented by a $$$n \times m$$$ grid of unit cells. Some (possibly zero) cells are blocked by rocks, and the remaining cells are free. Two cells are neighbors if they share an edge. Each cell has up to 4 neighbors: two in the horizontal direction and two in the vertical direction. Since the garden is represented as a grid, we can classify the cells in the garden as either "black" or "white". The top-left cell is black, and two cells which are neighbors must be different colors. Cell indices are 1-based, so the top-left corner of the garden is cell $$$(1, 1)$$$.Jaehyun wants to turn his garden into a maze by placing some walls between two cells. Walls can only be placed between neighboring cells. If the wall is placed between two neighboring cells $$$a$$$ and $$$b$$$, then the two cells $$$a$$$ and $$$b$$$ are not neighboring from that point. One can walk directly between two neighboring cells if and only if there is no wall directly between them. A maze must have the following property. For each pair of free cells in the maze, there must be exactly one simple path between them. A simple path between cells $$$a$$$ and $$$b$$$ is a sequence of free cells in which the first cell is $$$a$$$, the last cell is $$$b$$$, all cells are distinct, and any two consecutive cells are neighbors which are not directly blocked by a wall.At first, kids will gather in cell $$$(1, 1)$$$, and start the hide-and-seek game. A kid can hide in a cell if and only if that cell is free, it is not $$$(1, 1)$$$, and has exactly one free neighbor. Jaehyun planted roses in the black cells, so it's dangerous if the kids hide there. So Jaehyun wants to create a maze where the kids can only hide in white cells.You are given the map of the garden as input. Your task is to help Jaehyun create a maze.

Your program will be judged in multiple test cases. The first line contains the number of test cases $$$t$$$. ($$$1 \le t \le 100$$$). Afterward, $$$t$$$ test cases with the described format will be given. The first line of a test contains two integers $$$n, m$$$ ($$$2 \le n, m \le 20$$$), the size of the grid. In the next $$$n$$$ line of a test contains a string of length $$$m$$$, consisting of the following characters (without any whitespace):    O: A free cell.  X: A rock.  It is guaranteed that the first cell (cell $$$(1, 1)$$$) is free, and every free cell is reachable from $$$(1, 1)$$$.  If $$$t \geq 2$$$ is satisfied, then the size of the grid will satisfy $$$n \le 10, m \le 10$$$. In other words, if any grid with size $$$n > 10$$$ or $$$m > 10$$$ is given as an input, then it will be the only input on the test case ($$$t = 1$$$).

For each test case, print the following: If there are no possible mazes, print a single line NO. Otherwise, print a single line YES, followed by a grid of size $$$(2n-1) \times (2m-1)$$$ denoting the found maze. The rules for displaying the maze follows. All cells are indexed in 1-base.   For all $$$1 \le i \le n, 1 \le j \le m$$$, if the cell $$$(i, j)$$$ is free cell, print 'O' in the cell $$$(2i-1, 2j-1)$$$. Otherwise, print 'X' in the cell $$$(2i-1, 2j-1)$$$.  For all $$$1 \le i \le n, 1 \le j \le m-1$$$, if the neighboring cell $$$(i, j), (i, j+1)$$$ have wall blocking it, print ' ' in the cell $$$(2i-1, 2j)$$$. Otherwise, print any printable character except spaces in the cell $$$(2i-1, 2j)$$$. A printable character has an ASCII code in range $$$[32, 126]$$$: This includes spaces and alphanumeric characters.  For all $$$1 \le i \le n-1, 1 \le j \le m$$$, if the neighboring cell $$$(i, j), (i+1, j)$$$ have wall blocking it, print ' ' in the cell $$$(2i, 2j-1)$$$. Otherwise, print any printable character except spaces in the cell $$$(2i, 2j-1)$$$  For all $$$1 \le i \le n-1, 1 \le j \le m-1$$$, print any printable character in the cell $$$(2i, 2j)$$$.  Please, be careful about trailing newline characters or spaces. Each row of the grid should contain exactly $$$2m-1$$$ characters, and rows should be separated by a newline character. Trailing spaces must not be omitted in a row.

4
2 2
OO
OO
3 3
OOO
XOO
OOO
4 4
OOOX
XOOX
OOXO
OOOO
5 6
OOOOOO
OOOOOO
OOOOOO
OOOOOO
OOOOOO

YES
OOO
  O
OOO
NO
YES
OOOOO X
  O O
X O O X
  O
OOO X O
O O   O
O OOOOO
YES
OOOOOOOOOOO
  O   O   O
OOO OOO OOO
O   O   O
OOO OOO OOO
  O   O   O
OOO OOO OOO
O   O   O
OOO OOO OOO


Today, Mezo is playing a game. Zoma, a character in that game, is initially at position $$$x = 0$$$. Mezo starts sending $$$n$$$ commands to Zoma. There are two possible commands:  'L' (Left) sets the position $$$x: =x - 1$$$;  'R' (Right) sets the position $$$x: =x + 1$$$. Unfortunately, Mezo's controller malfunctions sometimes. Some commands are sent successfully and some are ignored. If the command is ignored then the position $$$x$$$ doesn't change and Mezo simply proceeds to the next command.For example, if Mezo sends commands "LRLR", then here are some possible outcomes (underlined commands are sent successfully):   "LRLR" — Zoma moves to the left, to the right, to the left again and to the right for the final time, ending up at position $$$0$$$;  "LRLR" — Zoma recieves no commands, doesn't move at all and ends up at position $$$0$$$ as well;  "LRLR" — Zoma moves to the left, then to the left again and ends up in position $$$-2$$$. Mezo doesn't know which commands will be sent successfully beforehand. Thus, he wants to know how many different positions may Zoma end up at.

The first line contains $$$n$$$ $$$(1 \le n \le 10^5)$$$ — the number of commands Mezo sends. The second line contains a string $$$s$$$ of $$$n$$$ commands, each either 'L' (Left) or 'R' (Right).

Print one integer — the number of different positions Zoma may end up at.

NoteIn the example, Zoma may end up anywhere between $$$-2$$$ and $$$2$$$.


Today, Osama gave Fadi an integer $$$X$$$, and Fadi was wondering about the minimum possible value of $$$max(a, b)$$$ such that $$$LCM(a, b)$$$ equals $$$X$$$. Both $$$a$$$ and $$$b$$$ should be positive integers.$$$LCM(a, b)$$$ is the smallest positive integer that is divisible by both $$$a$$$ and $$$b$$$. For example, $$$LCM(6, 8) = 24$$$, $$$LCM(4, 12) = 12$$$, $$$LCM(2, 3) = 6$$$.Of course, Fadi immediately knew the answer. Can you be just like Fadi and find any such pair?

The first and only line contains an integer $$$X$$$ ($$$1 \le X \le 10^{12}$$$).

Print two positive integers, $$$a$$$ and $$$b$$$, such that the value of $$$max(a, b)$$$ is minimum possible and $$$LCM(a, b)$$$ equals $$$X$$$. If there are several possible such pairs, you can print any.