a=input().strip()
b=input().strip()
print(a.replace('h','@').replace('d','*').replace('@','d').replace('*','h'))