Buying shares

You have cc coins, and you must make nn stock transactions. Each transaction involves buying or selling a share. All shares are worth one coin each. You can only buy if you have a coin, and can only sell if you have a share.

Given nn and cc, print all possible sequences of operations.

Input

Input consists of nn and cc. Suppose 1cn161 \le c \le n \le 16.

Output

Print in alphabetical order all possible sequences of nn operations when we start with cc coins. Use ‘b’ to buy and ‘s’ to sell.

Problem information

Author: Unknown
Translator: Salvador Roura

Generation: 2026-01-25T15:51:19.222Z

© Jutge.org, 2006–2026.
https://jutge.org