-->
当前位置:首页 > 题库

PROGRAMMING:Magic string

Luz5年前 (2021-05-10)题库397
Chen Shuai has two lowercase letters to form a kebab, an ordinary kebab s and a magic kebab T. the bamboo stick of T kebab is very long, which can insert a lot of food, and it has a magical effect. The smaller the dictionary order of all the letters on t string, the more delicious it is, and it's not easy to get fat. In order to keep fit, Chen Shuai plans to put the letters on s string on t string.
Chen Shuai is known to have two operations
*Take a character from the head of s string and add it to the tail of T
*Take a character from the tail of s string and add it to the tail of T
Chen Shuai felt that this kind of operation was too simple and didn't want to do it, so he asked smart younger students to help.
###Input format:
Enter two strings S, t( s. Length of T < = 2000)
###Output format:
The output adds the s string to the t string after the t string.
###Input example:
Here is a set of inputs. For example:
```in
cdb abc
```
###Output example:
The corresponding output is given here. For example:
```out
abcbcd
```







answer:If there is no answer, please comment