Regular Expression Matching

hard
1. You are given two strings S1 and S2. S1 represents a text and S2 represents a pattern.
2. You have to print 'true' if the pattern is matched with the given text, otherwise print 'false'.

The pattern can include the characters '.' and '*'
'.' - matches any single character
'*' - matches zero or more of the preceding character

Input Format

2 strings S1 and S2

Output Format

true or false as required

Constraints

1 < length of strings S1 amd S2 <= 200

Example

Input
aa
a
Output
false
Previous
Boundary Traversal Of A Binary Tree
Next
Longest Common Substring

Related Questions