# Program to Find nth Trimorphic Number rangenumber=int(input("Enter a Nth Number:"))c = 0letest = 0num = 1while c != rangenumber:    flag = 0    num1=num    cube_power = num * num * num    while num1 != 0:        if num1 % 10 != cube_power % 10:            flag = 1            break        num1 //= 10        cube_power //= 10    if flag == 0:            c+=1            letest = num    num = num + 1print(rangenumber,"th Trimorphic number is ",latest)