For this Question: Given two strings 'str1' and 'str2', check whether both of these strings are beautiful or not.
Two strings str1 and str2 are called beautiful if there is a one-to-one mapping possible for every character of str1 to every character of str2 while preserving the order.

<b>Note</b>: All occurrences of every character in str1 should map to the same character in str2First line contain a string str1. Second line contain a string str2.

<b>Constraints:</b>
1 <= |str1|, |str2| <= 2*10^4Print "Yes" if str1 and str2 are beautiful otherwise print "No".Sample Input 1:
ppqrr
ffghh

Sample Output 1:
Yes

Explanation:
Given strings are Beautiful among each other.
There a three different strings in str1 and str2 with equal frequency.
str1
p : 2 
q : 1
r : 2
Similarly str2 having 
f : 2
g : 1
h : 2, I have written this Solution Code: import numpy as np
from collections import defaultdict

str1=input()
str2=input()
str1_d=defaultdict(int)
str2_d=defaultdict(int)
for i in str1:
  str1_d[i]+=1
for i in str2:
  str2_d[i]+=1
c=1
for i in range(len(str1)):
  if(str1_d[str1[i]]!=str2_d[str2[i]]):
    c=0
    break
if(c==1):
  print("Yes",end="")
else:
  print("No",end=""), In this Programming Language: Python, Now tell me if this Code is compilable or not?