1173: Compare String

Memory Limit:128 MB Time Limit:1.000 S Judge Style:Text Compare Creator:
Submit:47 Solved:15

Description

Given two strings, s and t, return true if they are equal after being inputted into an empty text editor. The character "#" represents a backspace.


Note: If a backspace character is entered with an empty text, the text remains empty.  

不允许普通用户打印题目,请教师登录后使用。如有疑问请联系管理员!

Input

Multiple sets of test cases. Each set of test cases occupies one line, consisting of two strings s and t separated by spaces
The length of both strings, s and t, does not exceed 1,000,000.
Input contains only numbers, uppercase and lowercase letters, and '#'

Output

Each set of test cases occupies a separate line.
If s and t are equal, output "true"; otherwise, output "false".

Sample Input Copy

dsafsad123213 #########dsafsad123213
123###444##56 ###456##56888###
1233321### 12333212### 

Sample Output Copy

true
true
false