{"problem":{"name":"J. Choreographer Problem","description":{"content":"As you probably know, choreography is the art of making dances. But it is not a so well-known fact that it is also the science of making dances. There are n dancers numbered from 1 to n in the dance ","description_type":"Markdown"},"platform":"Codeforces","limit":{"time_limit":2000,"memory_limit":65536},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"CF10125J"},"statements":[{"statement_type":"Markdown","content":"As you probably know, choreography is the art of making dances. But it is not a so well-known fact that it is also the science of making dances.\n\nThere are n dancers numbered from 1 to n in the dance troupe, and all of them are working hard to create a new original dance. Before the dance starts each dancer puts on his special hand-made costume, and he has to wear this costume for the duration of the entire dance.\n\nIt is known that the costume of i-th dancer is similar to the costumes of (i - 1)-th and (i + 1)-th dancers (therefore the dancers are similar too), but at the same time, i-th dancer is not similar to any other dancer. Therefore, (i - 1)-th and (i + 1)-th dancers are not similar. If n > 1, then the first dancer has the only similar dancer, the last dancer has the only similar dancer, and all other dancers have exactly two similar dancers.\n\nThe dance starts and ends with an empty stage. The stage should not be empty during the dance. Each minute one of the following changes happens on the stage: \n\nAt every moment of time the stage must not have more than k dancers, because spectators may lose attention if there are too many dancers on the stage. \n\nNow choreographer is thinking about arranging the dance in such a way that each set of the dancers containing no more than k dancers appears on the stage exactly once. Your job is to write a program to help the choreographer.\n\nThe first line contains two positive integer numbers n, k (1 ≤ n ≤ 20;1 ≤ k ≤ n).\n\nPrint the only line describing the dance. The substring «_+_i» means that the i-th dancer appears on the stage, the substring «_-_i» means that the i-th dancer leaves the stage. The substring «_++_i» means that the i-th dancer leaves while the similar (i + 1)-th dancer appears, and «_-–_i» means that the i-th dancer leaves while the similar (i - 1)-th dancer appears. The output will be processed from the left to the right.\n\nIf there are many solutions, you may output any of them. If there is no solution, print 0 to the only line of output.\n\n## Input\n\nThe first line contains two positive integer numbers n, k (1 ≤ n ≤ 20;1 ≤ k ≤ n).\n\n## Output\n\nPrint the only line describing the dance. The substring «_+_i» means that the i-th dancer appears on the stage, the substring «_-_i» means that the i-th dancer leaves the stage. The substring «_++_i» means that the i-th dancer leaves while the similar (i + 1)-th dancer appears, and «_-–_i» means that the i-th dancer leaves while the similar (i - 1)-th dancer appears. The output will be processed from the left to the right.If there are many solutions, you may output any of them. If there is no solution, print 0 to the only line of output.\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"CF10125J","tags":[],"sample_group":[],"created_at":"2026-03-03 11:00:39"}}