Author: | M. Sporyshev | Time limit: | 1 sec | |
Input file: | input.txt | Memory limit: | 256 Mb | |
Output file: | output.txt |
You are given two strings of small Latin letters, S and T. Some letters of string S may be replaced by letters of T according to the following rules:
You program must modify string S according to the rules above to get lexicographically smallest string.
First line of input file contains string S. Second line of input file contains string T.
Output file must contain optimally modified string S.
0<|S|,|T|≤105
No. | Input file (input.txt ) |
Output file (output.txt ) |
---|---|---|
1 |
|
|
2 |
|
|