Expression#7496

Expression

5 seconds
256 megabytes
Easy

In computing, regular expressions are a powerful tool for text search and string matching. In this problema simplified version of regular expressions is used:

Parentheses can be omitted, in this problem Kleene star has the highest priority, concatenation hasmedium priority and alternation has lowest priority. Thus "abc*|de" means "((ab)(c*))|((de))".

For example, string "abcabcab" matches "a(bc|a)*ab", but string "abcbab" does not.

Your task is to find the shortest string that matches the given regular expression E and contains thegiven substring S.

Input

The first line contains the regular expression E. The second line contains the substring S (1 ≤ |E|,|S| ≤ 10 000).

String S consists of uppercase English letters. Expression E consists of uppercase English letters and special characters: dots ('.'), parentheses ('(' and ')'), pipes ('|'), and asterisks ('*').

Output

Output the shortest possible string T that both matches E and contains S as substring. If there are no such strings, output "No".

The string T should contain only uppercase English letters.

Examples

Example 1

Loading
Loading

Example 2

Loading
Loading